My python installation on 1and1 stopped working (bashrc issue)

67 Views Asked by At

I installed python 2.7.10 on my 1and1 linux hosting service about 8 months ago (using instructions from http://geeksta.net/geeklog/python-shared-hosting/) and everything was working fine (I had a daily cron job that would call my python script). But recently,my python script stopped working and it appears that the call to python itself is the culprit, rather than the python code. Whenever I type 'python' into the command line in the 1and1 unix ssh session now, i get the following error message

"-bash: /kunden/homepages/26/xxxxxxxxxx/htdocs/python27/bin/python: No such file or directory"

It's been awhile since I installed things, but I don't believe I had this issue previously. I'm trying to figure out why it's not working and what I can do to get it fixed. It appears that calling python isn't working properly (which would affect my script as well).

Any help with getting this working would be greatly appreciated.

2

There are 2 best solutions below

0
On

when you type python, system find it in /kunden/homepages/26/xxxxxxxxxx/htdocs/python27/bin/python, but there is no such a file in fact. what you need to do is trying to locate your python binary executable file, and alias your python to your file

0
On

I ended up just reinstalling python 2.7 again and it works again. Not sure why it stopped working before.

Now I can type "python" in the command line and it starts the Python console.