Pygtk import error using Anaconda

OS: Ubuntu 15.10

I had no problems importing pygtk with the default Python interpreter. However, I could not do this using the Anaconda interpreter.

Python 2.7.11 |Anaconda 2.5.0 (64-bit)| (default, Dec  6 2015, 18:08:32) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import pygtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pygtk

I also could not get it to work after installing pygtk with conda.

/opt/anaconda2/pkgs$ conda info --env
Using Anaconda Cloud api site https://api.anaconda.org
# conda environments:
#
root                  *  /opt/anaconda2

/opt/anaconda2/pkgs$ conda list -n root|grep pygtk
pygtk                     2.16.0                        1    ska

As you can see from the output, pygtk pkg is available under the root env.

Any ideas what I missed or did wrong?

+4
source share
1 answer

I have not had success with ska/pygtk, but mw/pygtk2worked for me:

conda install -c https://conda.anaconda.org/mw pygtk2

Other information here

0
source

Source: https://habr.com/ru/post/1628812/


All Articles