Error when add nextflow to PATH variable
1
0
Entering edit mode
2.0 years ago
Chris ▴ 340

Hi all,

After running:

export PATH=$PATH:/path/to/nextflow

when I type nextflow, I still got: -bash: nextflow: command not found

./nextflow works.

Would you please explain why? Thank you so much!

Update: I create a new folder and move nextflow to it folder then it worked.

nextflow • 1.9k views
ADD COMMENT
2
Entering edit mode
2.0 years ago

If you have the nextflow binary in your $HOME directory and you're adding the path including the file to PATH, e.g. export PATH=$PATH:/Users/mribeirodantas/nextflow, then it indeed will fail. You have to set it like that:

export PATH=$PATH:/Users/mribeirodantas

Another issue that you may run into is that this approach only applies to the current bash session. If you open a new session, the default PATH will be the one taken into consideration. You can change your $HOME/.bashrc to make sure you always have the PATH environment variable including the path to your nextflow binary.

ADD COMMENT
0
Entering edit mode

Thank you so much! Also, log out and log in back to make it works.

ADD REPLY

Login before adding your answer.

Traffic: 2484 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