mhammell-laboratory / TEtranscripts

A package for including transposable elements in differential enrichment analysis of sequencing datasets.
http://hammelllab.labsites.cshl.edu/software/#TEtranscripts
GNU General Public License v3.0
229 stars 30 forks source link

No module named setuptools #211

Open GimenaA opened 5 days ago

GimenaA commented 5 days ago

Hello, I've used TEtranscripts in the past, but now I'm trying to install it in a new computer. However, when I enter "python setup.py install" I get this error message: Traceback (most recent call last): File "setup.py", line 1, in <module> from setuptools import setup ImportError: No module named setuptools

I tried installing setuptools with pip3 but it's not solving the problem. Can you please help me?

olivertam commented 5 days ago

Hi,

Could you provide information on your python?

$ python --version
$ echo $PYTHONPATH

You could also try installing TEtranscripts with pip3

$ pip3 install TEtranscripts

Thanks.

GimenaA commented 5 days ago

Thank you for your quick reply.

python --version Python 2.7.18 python3 --version Python 3.8.5 echo $PYTHONPATH appears blank

GimenaA commented 5 days ago

I also tried installing it with pip3 install TEtranscripts like you suggested. It installed successfully, but when I try to use TEtranscripts I get a new error:

Traceback (most recent call last):
  File "/home/gimena/.local/bin/TEtranscripts", line 30, in <module>
    import pysam
  File "/home/gimena/.local/lib/python3.8/site-packages/pysam/__init__.py", line 16, in <module>
    import pysam.libcsamfile as libcsamfile
  File "pysam/libcsamfile.pyx", line 1, in init pysam.libcsamfile
  File "pysam/libcalignedsegment.pyx", line 61, in init pysam.libcalignedsegment
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ImportError: libffi.so.7: cannot open shared object file: No such file or directory

I tried installing pysam, but I get this message:

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pysam in ./.local/lib/python3.8/site-packages (0.22.0)

Thank you for your help

olivertam commented 5 days ago

Thanks for your quick reply.

It looks like you have two different versions of python on your system, and it's causing a conflict because python (which is the default way to call the interpreter to run TEtranscripts) is using version 2.7.18, whereas you're installing everything using pip3, which would correspond to python3. Thus when you installed setuptools with pip3, it went to python3 and not python.

With your pip3 installation of TEtranscripts, it appears that the issue is related to a python module called ctypes, which is a dependency of pysam, and appears to be part of the OS installation. This has been reported elsewhere, and there are some suggestions there. Without knowing how your system is set up, I'm not sure I could easily resolve this.

There are two options to bypass this: 1) Run TEtranscripts as a Docker/Singularity container (see our README for details) 2) Set up a self-contained environment (e.g. using conda or its derivative) with its own separate python, TEtranscripts and all its dependencies.

Let me know if anything is unclear.

Thanks.

GimenaA commented 5 days ago

Thank you so much for your help! I'll take a look at it tomorrow and see if I can solve the issues. Thanks again.

Best Regards,

Gimena Alegre

Research Associate

Department of Neurobiology

University of Massachusetts Medical School

Lazare Medical Research Building, Room 760B

364 Plantation Street, Worcester, MA 01605

Phone: (508)856-4415


From: Oliver Tam @.> Sent: Thursday, November 21, 2024 7:32:33 PM To: mhammell-laboratory/TEtranscripts @.> Cc: Alegre, Gimena @.>; Author @.> Subject: Re: [mhammell-laboratory/TEtranscripts] No module named setuptools (Issue #211)

Thanks for your quick reply.

It looks like you have two different versions of python on your system, and it's causing a conflict because python (which is the default way to call the interpreter to run TEtranscripts) is using version 2.7.18, whereas you're installing everything using pip3, which would correspond to python3. Thus when you installed setuptools with pip3, it went to python3 and not python.

With your pip3 installation of TEtranscripts, it appears that the issue is related to a python module called bcrypt, which is a dependency of pysam. This error has been reported herehttps://github.com/pyca/bcrypt/issues/274, but it sounds like it's something to do with your system environment. Without knowing how your system is set up, I'm not sure I could easily resolve this.

There are two options to bypass this:

  1. Run TEtranscripts as a Docker/Singularity container (see our READMEhttps://github.com/mhammell-laboratory/TEtranscripts/blob/master/README.rst for details)
  2. Set up a self-contained environment (e.g. using conda or its derivative) with its own separate python, TEtranscripts and all its dependencies.

Let me know if anything is unclear.

Thanks.

— Reply to this email directly, view it on GitHubhttps://github.com/mhammell-laboratory/TEtranscripts/issues/211#issuecomment-2492630686, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASFRYS4KEEUFW6L66FRYXFT2BZ3SDAVCNFSM6AAAAABSIDXF3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJSGYZTANRYGY. You are receiving this because you authored the thread.Message ID: @.***>

GimenaA commented 1 day ago

I was able to solve it by setting up a conda environment and then installing TEtranscripts like you suggested on the second option. Thank you.