I think it doesn't make a difference here but I'm using Python 2.7.
So the general part of my question is the following: I use a separate virtualenv
for each of my projects. I don't have administrator access and I don't want to mess with system-installed packages anyway. Naturally, I want to use wheels to speed up package upgrades and installations across the virtualenv
s. How can I build a wheel whose dependencies are only met within a specific virtualenv
?
Specifically, issuing
pip wheel -w $WHEELHOUSE scipy
fails with
Building wheels for collected packages: scipy
Running setup.py bdist_wheel for scipy
Destination directory: /home/moritz/.pip/wheelhouse
Complete output from command /home/moritz/.virtualenvs/base/bin/python -c "import setuptools;__file__='/home/moritz/.virtualenvs/base/build/scipy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /home/moritz/.pip/wheelhouse:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/moritz/.virtualenvs/base/build/scipy/setup.py", line 237, in <module>
setup_package()
File "/home/moritz/.virtualenvs/base/build/scipy/setup.py", line 225, in setup_package
from numpy.distutils.core import setup
ImportError: No module named numpy.distutils.core
----------------------------------------
Failed building wheel for scipy
Failed to build scipy
Cleaning up...
because numpy
is not globally present and while building the wheel works when a virtualenv
with numpy
installed is active, it seems like a terrible idea to have the wheel depend on a specific virtualenv
's version of numpy
.
pandas
which also depends on numpy
appears to install its own components of numpy
but I'm not sure that's the best solution.
I could install numpy
with --user
and use that to build the scipy
wheel. Are there better options?