|
15 | 15 | try:
|
16 | 16 | from . import multiarray
|
17 | 17 | except ImportError as exc:
|
| 18 | + import sys |
18 | 19 | msg = """
|
| 20 | +
|
| 21 | +IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! |
| 22 | +
|
19 | 23 | Importing the multiarray numpy extension module failed. Most
|
20 | 24 | likely you are trying to import a failed build of numpy.
|
21 |
| -If you're working with a numpy git repo, try `git clean -xdf` (removes all |
22 |
| -files not under version control). Otherwise reinstall numpy. |
| 25 | +Here is how to proceed: |
| 26 | +- If you're working with a numpy git repository, try `git clean -xdf` |
| 27 | + (removes all files not under version control) and rebuild numpy. |
| 28 | +- If you are simply trying to use the numpy version that you have installed: |
| 29 | + your installation is broken - please reinstall numpy. |
| 30 | +- If you have already reinstalled and that did not fix the problem, then: |
| 31 | + 1. Check that you are using the Python you expect (you're using %s), |
| 32 | + and that you have no directories in your PATH or PYTHONPATH that can |
| 33 | + interfere with the Python and numpy versions you're trying to use. |
| 34 | + 2. If (1) looks fine, you can open a new issue at |
| 35 | + https://github.com/numpy/numpy/issues. Please include details on: |
| 36 | + - how you installed Python |
| 37 | + - how you installed numpy |
| 38 | + - your operating system |
| 39 | + - whether or not you have multiple versions of Python installed |
| 40 | + - if you built from source, your compiler versions and ideally a build log |
| 41 | +
|
| 42 | + Note: this error has many possible causes, so please don't comment on |
| 43 | + an existing issue about this - open a new one instead. |
23 | 44 |
|
24 | 45 | Original error was: %s
|
25 |
| -""" % (exc,) |
| 46 | +""" % (sys.executable, exc) |
26 | 47 | raise ImportError(msg)
|
27 | 48 | finally:
|
28 | 49 | for envkey in env_added:
|
|
0 commit comments