I have a freshly installed Ubuntu on a freshly built computer. I just installed python-pip using apt-get. Now when I try to pip install Numpy and Pandas, it gives the following error.
I've seen this error mentioned in quite a few places on SO and Google, but I haven't been able to find a solution. Some people mention it's a bug, some threads are just dead... What's going on?
I still do have a problem with the installation even though i have gotten numpy. Is there anyone else that have this problem? –
eleijonmarckMar 19 '15 at 21:45
As OP, and 3 years later, I can say I have solved this by migrating to Haskell ;) –
Josh.FAug 7 at 22:50
This adds numpy to your system python interpreter. I may have had to do the same for matplotlib. To use in a virtualenv, you have to create your environment using the
You don't need to recreate your virtualenv, you can modify an existing one with virtualenv VIRTUALENV_DIR --system-site-packages. –
fiatjafDec 6 '14 at 3:09
3
Had same issue on Ubuntu server 14.02. sudo apt-get install python2.7-dev solved the issue. –
baltasvejasMay 25 '15 at 16:31
1
This solves the problem but I think you should at least mention you are making (all) system packages available, so the point of using virtualenv is partially defeated... –
MarkAug 2 '15 at 13:53
The install didn't work for me both within, and outside a virtualenv so using --system-site-packages was not the right answer. I got it to work inside a virtualenv with LC_ALL=C pip install .... –
ArjunSep 19 '16 at 16:55
I had a similar error when running pip install pandas and it was due to a memory shortage. I increased the memory in my virtual machine to 4G and that fixed things.
So many answers and none worked for me even though some clearly worked for other people. But I then figured out what my problem was, so I'll just add it to the collection:
dpkg-reconfigurelocales
# enable the "en-US.UTF-8" locale
# when asked for a default, no need to define one
The thing is, I was working inside a Debian Stretch linux container that happened to not have any UTF-8 locales installed, probably because I downloaded a minimal stock image. With this UTF-8 locale now installed, pip properly installed numpy and other packages.
In my case I had just installed Python from source (on a remote machine where I am not sudo). For whatever reason, pip was on some really old version. So after:
python-mpipinstall--upgradepip
I was able to install numpy and everything I wanted without trouble.
LC_ALL=C
make any difference? – Charles Duffy Oct 20 '14 at 20:15