-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' #73
Comments
This seems to be because bottleneck and bcolz aren't interacting correctly with the pipenv environment. Installing them both manually via pip fixes this issue, but obviously you cannot do this on a heroku instance. |
Recently someone else also reported numpy install issue in Heroku elsewhere. Something like heroku/heroku-buildpack-python#704 is closest. There might be an issue in their CLI or something. |
@umitanuki This issue actually also occurs locally as well, I don't think it's purely a heroku issue. |
It looks like this is a known issue that can be caused by several things. If a clean install isn't working for you, can you walk us through the installation path you're using? It could be a cached wheel like someone mentioned there, or it could somehow be switching numpy versions unexpectedly. |
I'm simply running 'pipenv install' inside the q01 folder. I did manage to resolve this by using pipenv to generate a requirements.txt and installing using pip, after which I was able to proceed. |
I have the same problem when I try to load a pickled file
|
I had the same error with numpy=1.16 |
Had the same issue. Upgraded to numpy==1.16 and it works |
I have tried both and even checked out numpy's code. I can't find that module ('numpy.core._multiarray_umath') anywhere in numpy. Has anyone tried that? |
I found a few shared library files (*.so) in |
@bibinmjose For what it's worth, same issue here when using |
@saforem2 Me too noticed the problem when i try to unpickle a pickled bumpy array from another computer. I got around it by using python's statistics functions instead of numpy's. I tried to install numpy==16 but the story is the same. I was not able to upgrade numpy-base from 1.14 since it uninstalls a lot of dependencies. |
@saforem2 are you picking any numpy objects ? Try using another library. That might work. |
@bibinmjose I believe the error occurred when trying to load a normal dictionary (containing some numpy arrays as values). I switched to a different conda environment with |
I have this error recently since a few changes on my MAC. I followed all the best practices and can't seem to resolve this error.
This error occurs in the virtual environment. Both notebooks and command line python code generate the error. The python code runs 100% correctly with no other errors than this message. python my_py_file.py I deleted and recreated the venv but the error persists. Likely all the code continues to run without any other errors. I'm not sure what to do next. I do not like this error message. Any suggestions will be welcome. |
FYI, I just resolved this issue by forcing a reinstall of numpy and pandas as follows: pip install --upgrade --force-reinstall numpy==1.14.5 No more error message. |
Inside a new conda virtual environment,
|
Thanks man, I installed numpy 1.16 and it fixed the issue. |
Thanks man, it solves the problem. |
I've updated the numpy requirement to 1.16 across our various pylivetrader releases, and we'll try to keep the required numpy version as updated as possible, so this issue should not crop up anymore. |
upgrade numpy to latest version it solves the problem ^.^ |
|
@live-wire Problem is most often upgrading numpy will cause broken dependencies in other packages |
@bibinmjose How come? I though that |
@ninofiliu There was some compatibility issue with my tensorflow version and it was not upgrading numpy citing conflicts. Anyways, I have moved on and it's no longer an issue for me. |
I am facing a similar issue when trying to load a pickled file. Code, error & versions below. ModuleNotFoundError: No module named 'core' Tried pandas.read_pickle() too. It gives a similar No module named 'core' error. Any suggestion will be helpful. |
Nico reported related issue: alpacahq/pylivetrader#73
Had the same issue. Reinstalling numpy fixed it |
Same issue. Upgrading numpy to 1.16 fixed it,thanks |
for future readors , this how i fixed it : |
--- import sys --- During handling of the above exception, another exception occurred: Traceback (most recent call last): IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy C-extensions failed. This error can happen for We have compiled some common reasons and troubleshooting tips at:
Please note and check the following:
and make sure that they are the versions you expect. Original error was: No module named 'numpy.core._multiarray_umath' 2020-09-24 16:07:54:027 [Inf]CInterface::CallPython,Line=166 ******************** Python end **** |
When attempting to run the q01 example the following error occurs:
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
Traceback (most recent call last):
File "/home/[REMOVED]/.local/share/virtualenvs/q01-9tU7-qwB/bin/pylivetrader", line 7, in
from pylivetrader.main import main
File "/home/[REMOVED]/.local/share/virtualenvs/q01-9tU7-qwB/lib/python3.6/site-packages/pylivetrader/init.py", line 16, in
from pylivetrader import api # noqa
File "/home/[REMOVED]/.local/share/virtualenvs/q01-9tU7-qwB/lib/python3.6/site-packages/pylivetrader/api.py", line 24, in
from pylivetrader.finance import execution, commission, slippage, cancel_policy
File "/home/[REMOVED]/.local/share/virtualenvs/q01-9tU7-qwB/lib/python3.6/site-packages/pylivetrader/finance/execution.py", line 22, in
import pylivetrader.misc.math_utils as zp_math
File "/home/[REMOVED]/.local/share/virtualenvs/q01-9tU7-qwB/lib/python3.6/site-packages/pylivetrader/misc/math_utils.py", line 53, in
nanmean = bn.nanmean
AttributeError: module 'bottleneck' has no attribute 'nanmean'
This is in a fresh pipenv after running pipenv install inside the example directory.
This could be due to the version of numpy (1.14.6) required not containing this module. However, official documentation on what _multiarray_umath actually is or when it was added is very sparse.
Testing numpy versions myself, I can import this module when using numpy 1.16.0rc2. Which dependency requires this version of numpy?
Has anyone run into this and resolved it?
The text was updated successfully, but these errors were encountered: