Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install python packages using pip on go daddy linux hosting (don't have root access)

Tags:

python

linux

pip

Could you tell me how to install packages using pip on Go daddy Linux hosted server. It doesn't provide root access. When I try to install some python package

pip install numpy

it shows:

-bash: pip: command not found

It is giving my Python 2.6.6 and the location is:

/usr/bin/python

Is there any hack for it?

like image 680
Prasad Avatar asked Oct 21 '25 02:10

Prasad


1 Answers

You don't have pip installed. To install pip run this

easy_install --user pip

This will install pip for only you, without root access. If you don't have 'easy_installed' installed, you can run this to install pip without it

wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py --user

pip will be installed in .local/bin, to access it just use .local/bin/pip install numpy

To add pip to your PATH, so that you could access it like pip install numpy

execute this command:

echo "PATH=\$PATH:~/.local/bin" >> ~/.bashrc

and then this:

source ~/.bashrc

like image 112
d3corator Avatar answered Oct 23 '25 17:10

d3corator