-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
ImportError: no module named 'numpy' #1639
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
Comments
Unfortunately we cannot support to install numpy directly into a virtualenv as we can't support compiling C libraries. However numpy is installed globally on our buildservers, so you should be able to satisfy your requirements by allowing the virtualenv access to the system site packages. To do so, go to the Advanced settings section in your project's admin panel and select the checkbox in Use system packages. |
@gregmuellegger thank you for the explanation. However, I tried enabling that option and the build still failed. Also, this wouldn't explain why the build was originally working and then started failing a few weeks ago (unless scipy recently added numpy as a dependency, but I think it's been that way for a while...). Can you think of anything else that might be causing this? |
Hm, I'm no 100% sure but based on this comment (from 2012) it's not possible to use numpy/scipy combined with a virtualenv. However that seems little strange to me. Maybe can @ericholscher or @agjohnson shed some light on what the current situation looks like? Is it possible to use the system numpy/scipy with a virtualenv? |
It should be, I just debugged a project making use of scipy/numpy without any errors. Not sure what the case is here exactly though. |
Hm, it might be failing since we don't have numpy for Python 3 installed on the server. |
Hooray, it's fixed. @rkingsbury your builds are passing again: https://readthedocs.org/projects/pyeql/builds/3330459/ |
Great, thanks for your attention to this @gregmuellegger |
I have the same problems, using scipy in my project. Now I solved the numpy issue by installing it separately but RTD is still not able to install scipy.
https://readthedocs.org/projects/feedinlib/builds/3346237/ On my ubuntu maschine I solved the problems with scipy installing the following packages:
I tried it with python2 and python3. The odd thing is that the pyeql projects now compiles with scipy successfully. Even though they also had problems in the past (e.g. pysql). It failed on Sept. 10, 2015.
But worked on Sept. 17, 2015
|
@uvchik the reason it works now for pyeql is that we have added numpy and scipy for the Python 3 projects and pyeql is one of them. I assume that your build fails as it tries to manually install numpy as it is listed as requirement in your You might want to exclude numpy from your dependencies when building on readthedocs. You can test for the |
So, time has passed and numpy / scipy are now available as binary packages on pypi and install just fine with the
Any suggestions? |
Hi,
|
Both of these packages are referencing scipy/numpy after collection and before installation. These packages look to be both trying to import themselves before full installation -- iapws looks to be trying to get the version from the package. This is incorrect packaging behavior as dependencies aren't installed yet. There doesn't seem to be much we can do here, you'd have more luck bringing up the issue with the package maintainers. |
I can solve my problem checking the Give the virtual environment access to the global site-packages dir options. In thats case I ask if I must delete numpy/scipy dependences from requirement_docs.txt. Thanks for answer |
You should use $pip install numpy instead of $pip3 install numpy after you activate virtual environment. It's just because your vir env already knows that you are using the version of python 3. |
The builds for my project started failing a few weeks ago even though I have made no changes to my setup.py, conf.py, requirements.txt, or RTFD configuration. I'm building in a virtualenv, and the only thing listed in requirements.txt is 'numpydoc'. My project depends on the scipy and pint packages, which are included in setup.py.
Here is a partial log for the failure. It seems that scipy is pulling in numpy as a dependency, and that's when the failure occurs.
The text was updated successfully, but these errors were encountered: