Installing python on shared hosting 1 & 1
I am trying to install python on a 1and1.com shared linux hosting account.
There is a good guide to this address: http://www.jacksinner.com/wordpress/?p=3
However I am stuck at step 6 which is: "make install". The error I'm getting looks like this:
(uiserver):u58399657:~/bin/python > make install
Creating directory /~/bin/python/bin
/usr/bin/install: cannot create directory `/~โ: Permission denied
Creating directory /~/bin/python/lib
/usr/bin/install: cannot create directory `/~โ: Permission denied
make: *** [altbininstall] Error 1
I am looking forward to some suggestions.
UPDATE:
Below is an alternate version of the configuration step to fix the above error, however this time I get a different error:
(uiserver):u58399657:~ > cd Python-2.6.3
(uiserver):u58399657:~/Python-2.6.3 > ./configure -prefix=~/bin/python
configure: error: expected an absolute directory name for --prefix: ~/bin/python
(uiserver):u58399657:~/Python-2.6.3 >
source to share
The short version is, it looks like you've set a prefix /~/bin/python
instead of a simple one ~/bin/python
. This is usually done with an argument --prefix=path
before configure
or with another similar script. Try to fix this and then it should work. I would suggest the actual commands, but it's been awhile (hence my request to see what you type.)
Due to the above error, it tries to install in a subdirectory of the ~
root directory ( /
) instead of your home directory ( ~
).
EDIT: . After going through the linked tutorial, this step is wrong:
./configure --prefix=/~/bin/python
Instead, it should read:
./configure --prefix=~/bin/python
Note that this is being corrected in the very first comment on this post.
EDIT 2: It seems that whatever wrapper you are using does not expand the path correctly. Try this instead:
./configure --prefix=$HOME/bin/python
Otherwise, run echo $HOME
and replace this with the $HOME
above. It should look something like this:--prefix=/home/mscharley/bin/python
source to share
I faced the same issue with shared hosting 1and1 (your related tutorial is not available now). I followed Installing Python Modules on HostGator Hosting Using VirtualEnv with one change for 1 and 1. That is:
Instead:
> python virtualenv-1.11.6/virtualenv.py /home1/yourusername/public_html/yourdomain.com/env --no-site-package
I used:
> python virtualenv-1.11.6/virtualenv.py /kunden/homepages/29/yourusername/htdocs/env --no-site-package
The rest of the instructions have been processed and I have installed VirtualEnv successfully .
Example: 1and1 does not provide a request module and pip
cannot be used in shared hosting mode. This screenshot demonstrates that after installing VirtualEnv, you can use the command pip
and >>> import requests
work successfully in the end .
source to share