15

When I was trying to install a module 'pymc' through anaconda environments, it showed the error message as follows:

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

  • blaze -> pyyaml -> python[version='>=2.7,<2.8.0a0'] -> vc=9

  • blaze -> pyyaml -> yaml -> *[track_features=vc9]

  • pymc Use "conda info " to see the dependencies for each package.

I am using Python 2.7.14, and I installed anaconda 1.6.9 on a Windows. I am new to Python. I first tried to use cmd to install the module pymc and I ran into a lot of problems such as the requirement for install g77 compiler on windows. After I got the compiler from MinGW and also installed the Microsoft Visual C++ Compiler for Python, I still cannot install the module because there came new errors. That is when I found there is pymc module listed in anaconda environment that I can add manually, but it showed this conflict error.

I do not know whether the conflict comes from all those other stuff I installed above or not. Please HELP! Thanks!

Community
  • 1
  • 1
qismees
  • 153
  • 1
  • 1
  • 4

1 Answers1

19

Create a new conda environment for Python 2.7:

conda create -n my_pymc_env python=2.7

Activate it:

conda activate my_pymc_env

Alternatively, for older conda versions on Windows:

activate my_pymc_env

on Unix (including Mac OS X):

source activate my_pymc_env

Once activated, install your packages:

conda install pymc blaze

If you still get this message, install the Anaconda client:

conda install anaconda-client

and search for your package:

anaconda search mypackage

Look for a channel that has the right version for you and install:

conda install -c channel_with_right_version mypackage
Mike Müller
  • 82,630
  • 20
  • 166
  • 161
  • After activating the new environment, it seems that I cannot use the modules from the new environment if I stayed in the default environment. Is there any way I can use pymc module from my_pymc_env and still stay in the default environment? – qismees Feb 06 '18 at 23:19
  • The whole purpose of environments is isolation. So you would need to work against what `conda` tries to achieve. – Mike Müller Feb 07 '18 at 07:32
  • I made the pymc module in the new environment accessible in my default environment by adding the directory of the site-packages in my_pymc_env to the PYTHONPATH manager. The directory looks like C:/Users/*******/AppData/Local/Continnum/anaconda2/envs/my_pymc_env/lib/python2.7/site-packages – qismees Feb 08 '18 at 20:14