1

(Please bear with me for the long description, it has been quite a troubleshooting journey.)

My ultimate goal is to get python package graph_tool working on my system and also on ipynb if possible. I have already brew install graph-tool, as indicated here, but that's still insufficient.

So I follow conda instructions here, and try to fulfill all requirements including having cgal and python3.6. I had anaconda with python2.7 and python3.5 originally, but since python3.6 is necessary, I download anaconda3 with python3.6. (conda update python still kept giving me 3.5)

I delete /Users/mymacbook/anaconda, so that /Users/mymacbook/anaconda3 would the default search directory. And I have a mini-success!

$ python3
Python 3.6.2 |Anaconda, Inc.| (default, Sep 21 2017, 18:29:43) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

Unfortunately, as I continue to conda install the other packages required (boost, cgal, etc), my python3 is reverted back to 3.5 :(

$ python3
Python 3.5.4 |Anaconda custom (x86_64)| (default, Oct  5 2017, 02:58:14)

$ conda install python=3.6
Fetching package metadata ...........
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict:
  - cgal -> python 3.5*
  - python 3.6*
Use "conda info <package>" to see the dependencies for each package.

$ conda info cgal
Fetching package metadata ...........

ResolvePackageNotFound: 
  - cgal

Quite a pickle isn't it... A recommendation was to uninstall cgal due to ResolvePackageNotFound, but like I mentioned, I need both cgal and python3.6.

Thanks in advance for the help! (and please include applicable command lines with your suggestions - I'm a beginner)

ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
tamtam
  • 641
  • 9
  • 24

2 Answers2

1

Looking for Packages when you do a conda create .. or conda install ... , or even a conda search, it will only present you results consistent with your OS and in some cases, base python version.

What's really available You can go directly to Anaconda.org and search for you package. This will surface builds on channels other than the "official" anaconda distribution packages. When looking here, however, you must manually look through the files available as some may not be built for your os.

view the results of conda info to see your current channels. It looks like the channel "conda-forge" may have what you are craving.

conda create -n tamtams_project ipython cgal --channel conda-forge

I prefer knowing where packages are coming from when I stray from the default channels. you can always see that info by adding to your .condarc file with the command:

conda config --set show_channel_urls True

The above create would then show that nearly all of the packages would be conda-forge packages since the command line channel becomes the preferred channel.

So, a minor preference might be to use:

conda create -n tamtams_project ipython cgal -c defaults -c conda-forge 

Then you see most packages being default packages and two coming from conda-forge.

Phil Cooper
  • 5,747
  • 1
  • 25
  • 41
  • Hi Phil, thanks for your reply! The info on channels was helpful, but not applicable to resolving my issue. Thank you though! – tamtam Oct 24 '17 at 14:24
  • ok, but how not helpful. I gave you a channel with a compatable package you were looking for. Did you try the last command above? – Phil Cooper Oct 24 '17 at 15:11
0

Your installed copy of cgal is compiled for Python 3.5. If you look at https://anaconda.org/conda-forge/cgal/files , there's is a separate package for each Python minor version.

Managing Python — Conda documentation recommends either

  • installing a new Python to a new environment if you don't want to replace an existing installation, or
  • update'ing it (together with other packages if needed) if you do want to replace the current one

Of course, you can instead uninstall all version-specific packages, install the new Python, then reinstall the packages - but that's more work.

ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
  • thanks for your answer! Using your advice, I `conda create -n py36env python=3.6 anaconda` and `conda install -c conda-forge cgal` and it resolved the original issue - so thank you! – tamtam Oct 24 '17 at 14:19
  • Unfortunately I ran into a related issue with compiling. Would you mind taking a look? https://stackoverflow.com/questions/46912969/osx-c14-compiler-not-detected-multiple-versions-of-gcc – tamtam Oct 24 '17 at 14:20