(useable) Install numpy in Python virtualenv
転載する
https://stackoverflow.com/questions/18785063/install-numpy-in-python-virtualenv
The problem is
so do the following in order to obtain 'Python.h'
make sure apt-get and gcc are up to date
then install the python2.7-dev
and I see that you have most probably already done the above things.
pip will eventually spit out another error for not being able to write into
so do this:
https://stackoverflow.com/questions/18785063/install-numpy-in-python-virtualenv
The problem is
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
so do the following in order to obtain 'Python.h'
make sure apt-get and gcc are up to date
sudo apt-get update
sudo apt-get upgrade gcc
then install the python2.7-dev
sudo apt-get install python2.7-dev
and I see that you have most probably already done the above things.
pip will eventually spit out another error for not being able to write into
/user/bin/blahBlah/dist-packages/
or something like that because it couldn't figure out that it was supposed to install your desiredPackage (e.g. numpy) within the active env (the env created by virtualenv which you might have even changed directory to while doing all this) so do this:
pip -E /some/path/env install desiredPackage