Question: How to change the path so that screen can take the default python path?
0
gravatar for saadleeshehreen
5 months ago by
saadleeshehreen60 wrote:

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
script issue python • 194 views
ADD COMMENTlink modified 5 months ago by Jeffin Rockey1.1k • written 5 months ago by saadleeshehreen60

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

ADD REPLYlink modified 5 months ago • written 5 months ago by cpad011211k
1
gravatar for Jeffin Rockey
5 months ago by
Jeffin Rockey1.1k
Karimannoor
Jeffin Rockey1.1k wrote:

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 COMMENTlink modified 5 months ago • written 5 months ago by Jeffin Rockey1.1k
1

And remember

source ~/.bashrc

to make it work.

ADD REPLYlink written 5 months ago by MatthewP80

Thanks.I shall add that.

ADD REPLYlink written 5 months ago by Jeffin Rockey1.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 762 users visited in the last hour