problems with macs2 installation
0
0
Entering edit mode
7.9 years ago
Lila M ★ 1.3k

Hi, I'm trying to install macs2. After set the path and python path, I've tried to run macs2 and I have the following error message

Traceback (most recent call last):
  File "/home/projas/MACS2-2.1.1.20160309/bin/macs2", line 31, in <module>
    from MACS2.Constants import *
ImportError: No module named 'MACS2'

does anyone know whats going on?

Thanks!

ChIP-Seq • 6.3k views
ADD COMMENT
1
Entering edit mode

Is it possible to use the Anaconda package manager to install?

Simply download Anaconda, and then do conda install -c bioconda macs2

ADD REPLY
0
Entering edit mode

Thanks, it totally works now!

ADD REPLY
0
Entering edit mode

I'm not familiar with the software, but it looks like a standard python error where it can't find your modules. Which installation approach did you use?

ADD REPLY
0
Entering edit mode

I've used that:

$ pip install -U --no-deps MACS2

And after that I set my PYTHONPATH and PATH as follow:

$ export PYTHONPATH=$HOME/lib/python2.7/site-packages/:$PYTHONPATH
$ export PATH=$HOME/bin/:$PATH
ADD REPLY
2
Entering edit mode

Hmm, what's the output if you run pip show MACS2? And also, what is the output of python -c "import sys; print sys.path"? We want to see if the path to the MACS2 directory is in your python path. It seems like your python is currently not looking for the module in the right place.

ADD REPLY
0
Entering edit mode

for pip show MACS2

Location: /home/projas/MACS2-2.1.1.20160309

and for python -c import sys; print sys.path

 File "<string>", line 1
    import
         ^
SyntaxError: invalid syntax
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE (.*?)}/ at /usr/bin/print line 528.
Error: no such file "sys.path"

is the error here?

Thank you

ADD REPLY
0
Entering edit mode

No sorry, did you remember the quotation marks on the last one? python -c "import sys; print sys.path"

ADD REPLY
0
Entering edit mode

Sorry,

['', '/usr/local/lib/python2.7/site-packages', '/home/projas/MACS2-2.1.1.20160309', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
ADD REPLY
1
Entering edit mode

Ok, what's the output of this command: python -c "from MACS2.Constants import *; print MACS_VERSION"?

ADD REPLY
0
Entering edit mode

It says:

No module named MACS2.Constants

any clues?

ADD REPLY
2
Entering edit mode

Yes, the python you're using to run MACS can't see the MACS directory. Try this: export PYTHONPATH=/home/projas/MACS2-2.1.1.20160309/:$PYTHONPATH. To check if it works, then try python -c "from MACS2.Constants import *; print MACS_VERSION" again. What is the output now?

ADD REPLY
0
Entering edit mode

Hello. I encountered the same issue, and still could not get the correct answer after following steps given above. Please help. It is still saying No module named MACS2.Constants

ADD REPLY
0
Entering edit mode

Lila M : Please use ADD REPLY/ADD COMMENT when responding to existing posts to keep threads logically organized.

ADD REPLY

Login before adding your answer.

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