macs2 conda installation problem
3
0
Entering edit mode
6.1 years ago
jcs92 • 0

Hi,

I am trying to install Macs2 on my Mac using bioconda. However I get the following error:

Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:

  • macs2 -> python[version='>=2.7,<2.8.0a0'] -> *[track_features=debug]
  • python=3

Use "conda info <package>" to see the dependencies for each package.

I have both Python 2.7 and Python3 on my computer. Seems that maybe condo is seeing Python3, then refusing to install since Macs2 only works with Python 2.7. Anyone know if this is something I can fix by changing PATH to Python, or somehow making Python2.7 the default that condo sees?

Thanks,

software error python version macs2 OSX • 6.8k views
ADD COMMENT
0
Entering edit mode

On my linux(ubuntu 16.04) I usually change the defualt python version by adding

alias python='python2'

this line at the start of .bashrc file present in the home directory.

And if I want to use the syatem's python instead of conda, I will change the $PATH variable added by conda from

export PATH=/home/anaconda/bin/:$PATH

To

export PATH=$PATH:/home/anaconda/bin/

In .bashrc file.

ADD REPLY
0
Entering edit mode

I usually change the defualt python version by adding

You should be using python 3 now.

ADD REPLY
0
Entering edit mode

Thanks for replying, but modifying the bash file didn't work.

ADD REPLY
0
Entering edit mode

I think you need to source the .bashrc file after adding those lines or you can simply restart the session(terminal).

And one more tip just run

which python2
commamd and set the PYTHONPATH variable as mentioned here

Thank you.

ADD REPLY
0
Entering edit mode

PYTHONPATH is no longer relevant when installing via conda

ADD REPLY
4
Entering edit mode
6.1 years ago

You can use conda to create a virtual environment with the appropriate python version.

ADD COMMENT
0
Entering edit mode

It is unadvisable to manipulate system python binaries (particularly on Mac), so Wouter’s answer is absolutely the way to go.

ADD REPLY
0
Entering edit mode

Worked Wouter! Thanks!

ADD REPLY
1
Entering edit mode
6.1 years ago

sudo pip install MACS2 This should be able to install macs2. Please update following before trying:

1) pip install --upgrade pip 2) pip install numpy 3) pip install --upgrade numpy

Cheers !!

ADD COMMENT
0
Entering edit mode

That was going smoothly until I got this error:

Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-install-zj61p_t2/MACS2/

ADD REPLY
1
Entering edit mode

Do yourself a favor and use the virtual environment solution that Wouter suggested above. It is super-wasy to set up and simply typing source activate your-python2-environment is sufficient to activate it. That way you avoid messing around your two python versions that might do conflicting things plus additionally the use of both pip and conda which might cause trouble as well.

ADD REPLY
1
Entering edit mode
6.1 years ago
h.mon 35k

In addition to Wouter's answer, you can use virtualenv to install MACS2:

# If virtualenv is not installed
#pip install virtualenv
virtualenv -p python2 ~/bin/MACS2
source ~/bin/MACS2/bin/activate
pip install numpy
pip install macs2
ADD COMMENT

Login before adding your answer.

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