김종명
김종명

Reputation: 101

my python does not work " -bash: */python: Invalid argument"

Suddenly my development server python does not work.
Error message is as follows:

root@scu4:~# python
-bash: /root/anaconda3/bin/python: Invalid argument

/root/anaconda3/bin/ is python installed directory.

How can I fix it?

Upvotes: 2

Views: 1953

Answers (3)

Vlad
Vlad

Reputation: 8595

If Anaconda is on docker stop the docker and start it again.

docker stop <container>
docker start <container>
docker attach <continer>

See this issue for details.

Upvotes: 1

Eugene Lopatkin
Eugene Lopatkin

Reputation: 2757

conda update -n base -c defaults conda

helped me.

Upvotes: 0

k1941996
k1941996

Reputation: 183

this error is because its not opening python from directory in which its installed rather its opening from /root/anaconda3/bin/python and it requires some arguements. you can try python -h or python --help

there can be a chance that after installing anaconda it might have upgraded to python 3.x version try

root@scu4:~#python3 

might solve your problem.

If this doesnt help, sudo root and then run the following command : ls -lah /usr/bin | grep python it should produce some output if not python is relocated to someother directory.

Upvotes: 1

Related Questions