Question: macs2 conda installation problem
0
gravatar for jcs92
19 days ago by
jcs920
jcs920 wrote:

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,

ADD COMMENTlink modified 18 days ago by h.mon21k • written 19 days ago by jcs920

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 REPLYlink modified 19 days ago • written 19 days ago by Nitin Narwade320

I usually change the defualt python version by adding

You should be using python 3 now.

ADD REPLYlink written 19 days ago by WouterDeCoster34k

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

ADD REPLYlink written 19 days ago by jcs920

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 REPLYlink written 19 days ago by Nitin Narwade320

PYTHONPATH is no longer relevant when installing via conda

ADD REPLYlink written 18 days ago by jrj.healey8.7k
4
gravatar for WouterDeCoster
19 days ago by
Belgium
WouterDeCoster34k wrote:

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

ADD COMMENTlink written 19 days ago by WouterDeCoster34k

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

ADD REPLYlink written 19 days ago by jrj.healey8.7k

Worked Wouter! Thanks!

ADD REPLYlink written 17 days ago by jcs920
1
gravatar for Praneet Chaturvedi
19 days ago by
Cincinnati Children's Hospital and Medical Center
Praneet Chaturvedi100 wrote:

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 COMMENTlink written 19 days ago by Praneet Chaturvedi100

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 REPLYlink written 19 days ago by jcs920
1

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 REPLYlink written 18 days ago by ATpoint9.3k
1
gravatar for h.mon
18 days ago by
h.mon21k
Brazil
h.mon21k wrote:

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 COMMENTlink written 18 days ago by h.mon21k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1248 users visited in the last hour