user1696811
user1696811

Reputation: 971

How do you install numpy when you're not a superuser?

I've downloaded the python binary file and then opened it in my home folder using

tar xzvf Python-2.7.3.tgz

This seems to work and when I run

~/Python-2.7.3/python 

it works great. However when I try to import numpy, apparently it is not included. I've downloaded the numpy binary and opened it in my home directory but python still will not find it. Is there somewhere special that I have to put the numpy folder so that Python will find it?

Upvotes: 2

Views: 406

Answers (1)

jtriley
jtriley

Reputation: 601

Use pythonbrew to install Python into your $HOME folder:

$ pythonbrew install 2.7.2

Then switch your current shell to use your local Python install:

$ pythonbrew use 2.7.2

Now you should be able to install NumPy:

$ pip install numpy

Upvotes: 1

Related Questions