8

I am trying to install graph-tool from here: http://anaconda.org/vgauthier/graph-tool, using the command mentioned on that page.

I used the given command line:

conda install -c http://conda.anaconda.org/vgauthier graph-tool

and I get the following error:

Error: Could not find some dependencies for graph-tool: pixman

So I tried to install pixman in a similar way: http://anaconda.org/rwest/pixman.

conda install -c http://conda.anaconda.org/rwest pixman

This succeeded.

Yet the "could not find dependency" error is still there when trying to install graph-tool. Why does this happen and how can I fix it? There is no additional error message that I could go on.

Szabolcs
  • 24,728
  • 9
  • 85
  • 174
  • Have you used conda install? – Reblochon Masque Aug 26 '15 at 11:32
  • @ReblochonMasque As I mentioned in the question, I used the precise command shown in the linked pages. E.g., `conda install -c http://conda.anaconda.org/vgauthier graph-tool`. – Szabolcs Aug 26 '15 at 11:47
  • ok - maybe you could try --> conda update conda --> conda update anaconda --> conda update graph-tool and see if that helps? (these are 3 distinct commands). Did the error message give a list of the dependencies to install? – Reblochon Masque Aug 26 '15 at 12:02
  • @ReblochonMasque conda and anaconda are already at their latest versions (but I ran the conda update commands anyway). `conda update graph-tool` fails because `graph-tool` is not installed. The only error displayed when trying to install graph-tool is what I mentioned inthe post ([complete text](http://pastebin.com/PiMP57Ex)). `conda list pixman` shows that pixman is already installed. Is it maybe a version mismatch? Can I explicitly ask it to list graph-tool dependencies with versions? – Szabolcs Aug 26 '15 at 12:12

2 Answers2

5

Conda needs to be able to find all the dependencies at once. The -c flag only adds that channel for that one command. You would need to run conda install -c vgauthier rwest graph-tool. But an easier way is to add those channels to your configuration

conda config --add channels vgauthier --add channels rwest

Once you do this, you can just run

conda install graph-tool 

and it will grab things from those channels.

asmeurer
  • 86,894
  • 26
  • 169
  • 240
  • But if you use `vi .condarc` you can find that even if by separately adding channels, `conda` can find them all, – dia Jun 04 '18 at 10:58
0

Conflicting dependencies for Anacona 2020.11

When setting up a fedora-33 virtual machine with Anaconda (Version 2020.11) in April 2021, I got conflicting dependencies, as graph-tool was not compatible with python version 3.8.5. An pointed out here, the way to go is using a virtual environment with a supported version of python (3.7.9. in my case, as I still new from Anaconda version 2020.03).

In my case it was important to install Anaconda NOT as sudo. Otherwise some conda-alias was not set properly (which conda should give an about 30 lines command with some if/else condition).

Here are the bash commands:

$ cd ~/Downloads/
$ wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
$ sudo chown -R user:user /opt/  # needed in my case to avoid sudo for installing Anaconda and calling conda later
$ bash Anaconda3-2020.11-Linux-x86_64.sh  # location: /opt/anaconda3, run conda init: yes
$ source ~/.bashrc  # make command conda available. Like restarting terminal in this case.
$ conda create -n envGraphTool anaconda python=3.7.9
$ conda activate envGraphTool
$ conda install -c conda-forge graph-tool

And a test if everything worked:

(envGraphTool) [user@f33 Downloads]$ which python
/opt/anaconda3/envs/envGraphTool/bin/python
(envGraphTool) [user@f33 Downloads]$ python -V
Python 3.7.9
(envGraphTool) [user@f33 Downloads]$ python
Python 3.7.9 (default, Aug 31 2020, 12:42:55) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import graph_tool as gt
>>> exit()
(envGraphTool) [user@f33 Downloads]$
Markus Dutschke
  • 9,341
  • 4
  • 63
  • 58