This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Cutadapt installation issues

Hi,

I have installed the cutadapt on a server machine with out any errors. But when I use it results in the following error

bash: cutadapt: command not found

I am new to the linux OS and working on the servers. Can any one help me?

Thank you,
Naresh D J

rna-seq

Can u post commands how did u install cutadapt? The better way is pip install cutadapt or sudo pip install cutadapt.

Hi Goutham Atla,

Thank you for the reply,

I am installing it on the server machine. I do not have root access.

I have downloaded the cutadapt-1.8.3.tar.gz and installed using the command

$ python setup.py install --prefix=$USERAPPL/my_cutadapt

It produced the following.

I think you need to export PYTHONPATH as well. I would suggest you to run sudo pip install cutadapt. If you do not have sudo permissions, get python distributions like Anaconda, which makes life easier.

get python distributions like Anaconda, which makes life easier.

What? Anaconda has nothing to do user permissions. If you're suggesting that using "conda" instead of "pip" will help, then I think you're also off-base as conda's cutadapt release (1.3) is way behind the PyPI release (1.8.3). Also, please, please never recommend that anyone mess with their PYTHONPATH environment variable - especially users that seem to be having basic packaging/installation issues. PYTHONPATH should point to the system python library and the one in our $HOME/.local directory, and unless you have some extremely good reasons to change it please don't.

I mean to say adding to Pythonpath not entirely changing the pythonpath.

Sorry, I think you caught me on a grumpy day...

If you don't have root privileges, run:

pip install --user cutadapt

1 answer

You have to either specify the full path to the executable e.g.

/home/your_username/.local/bin/cutadapt

or add the directory where you installed cutadapt to your path by adding the following line to the .bashrc file in your home directory:

export PATH=$PATH:/path/to/your/cutadapt-installation

You can view your current path settings by typing:

echo $PATH

Regards,
Christian

Hi Christian,

Thank you for the reply.

I tried like this

export PATH=$PATH:/homeappl/home/njayavel/appl_taito/my_cutadapt/bin

Is this correct way of doing it? Then I am getting this error.

 Traceback (most recent call last):
  File "/homeappl/home/njayavel/appl_taito/my_cutadapt/bin/cutadapt", line 9, in <module>
    from cutadapt.scripts import cutadapt
ImportError: No module named cutadapt.scripts

Best Regards,
Naresh D J

I would take igor's advice and use the --user installation scheme. What this does is place the cutadapt module in your $HOME/.local directory and the cutadapt script in $HOME/.local/bin. What you've done so far will require that you append /homeappl/home/njayavel/appl_taito/my_cutadapt/ to your PYTHONPATH variable, but frankly I think that's a poor idea.

That is the solution, one more to do is source .bashrc file thank you!

Log in to answer this question.