How to change the path so that screen can take the default python path?
1
0
Entering edit mode
2.9 years ago

I am using a python script from GitHub to do some of my analysis. To run the script, I required some other programs which are also installed in our server. I linked the software with those programs by the following command.

ln -s /usr/local/bin/clustalo\
ln -s /usr/bin/blastn

The script behaves properly when I run it in our server and taking the python from the following path.

/usr/bin/python

But I can't run the program on screen because the python path is now as following and all the dependencies are not in this path.

userdata/student_users/X/software/miniconda2/bin/python

How can I change the path of the screen so that it takes this path?

/usr/bin/python
python script issue • 890 views
ADD COMMENT
0
Entering edit mode

Try providing the python executable path at the top of python script? (#!/usr/bin/python)

ADD REPLY
1
Entering edit mode
2.9 years ago
Jeffin Rockey ★ 1.2k

While installing Miniconda, towards the end, the script would have asked whether to add the path entries in ~/.bashrc and probably you would have given a yes. No problem with that. But this prefixing of miniconda path in ~/.bashrc is by which it gets its precedence.

Easiest fix to make system take the path you want is,

vi ~/.bashrc

then go to the bottom of entries and add

export PATH=/usr/bin:$PATH

This is not the cleanest method but it will work.

Other option is to comment the entries made by miniconda in ~/.bashrc.

Usually the entries will be demarcated with a informing comment line (# added by Miniconda2 installer) above.

Either case, please exit the terminal and login again for the changes to take effect.

ADD COMMENT
1
Entering edit mode

And remember

source ~/.bashrc

to make it work.

ADD REPLY
0
Entering edit mode

Thanks.I shall add that.

ADD REPLY

Login before adding your answer.

Traffic: 2352 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6