Reputation: 1
I trying to install a module called debacl that can be found on https://github.com/CoAxLab/DeBaCl on windows 64.
I am using the install command to install the module:
In [18]: run -i setup.py install
running install
running build
running build_py
running build_scripts
running install_lib
running install_scripts
running install_egg_info
Removing C:\Users\vjons\AppData\Local\Enthought\Canopy\User\Lib\site-packages\debacl-0.2.0-py2.7.egg-info
Writing C:\Users\vjons\AppData\Local\Enthought\Canopy\User\Lib\site-packages\debacl-0.2.0-py2.7.egg-info
The folder debacl then pops up in the Canopy\User\Lib\site-packages folder. But when i try to import the newly installed module I get the following error message:
In [3]: import debacl
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-3-5ef0bbe97964> in <module>()
----> 1 import debacl
C:\Users\vjons\AppData\Local\Enthought\Canopy\User\lib\site-packages\debacl\__init__.py in <module>()
1 # main debacl __init__.py
2
----> 3 import geom_tree
4 import cd_tree
5 import utils
C:\Users\vjons\AppData\Local\Enthought\Canopy\User\lib\site-packages\debacl\geom_tree.py in <module>()
24 import utils as utl
25 except:
---> 26 raise ImportError("Critical packages are not installed.")
27
28 try:
ImportError: Critical packages are not installed.
Okaj, I guess this means that the utils package has to be installed in order for debacl to be used. But utils is included in the debacl/-folder:
In [4]: ls C:\Users\vjons\AppData\Local\Enthought\Canopy\User\Lib\site-packages\debacl
Volume in drive C has no label.
Volume Serial Number is 423B-C99D
Directory of C:\Users\vjons\AppData\Local\Enthought\Canopy\User\Lib\site-packages\debacl
2014-05-26 16:04 72 __init__.py
2014-05-26 16:05 255 __init__.pyc
2014-05-26 16:04 25 521 cd_tree.py
2014-05-26 16:14 23 466 cd_tree.pyc
2014-05-26 16:04 50 373 geom_tree.py
2014-05-26 16:14 47 087 geom_tree.pyc
2014-05-26 16:05 <DIR> test
2014-05-26 16:04 21 488 utils.py
2014-05-26 16:14 22 480 utils.pyc
Am I missing something?
Upvotes: 0
Views: 361
Reputation: 5810
The problem is actually not about absolute imports, but that you are missing the package python-igraph. Two root causes:
1) the setup.py
file in debacl fails to import setuptools (should be the first line). But that would be trivial to work around (just install python-igraph separately), except that...
2) without Microsoft Visual C++ 2008 installed on your system, you would not be able to build python-igraph as required.
The easiest solution (which I have just tested successfully) is to:
1) Ensure that Canopy User Python is the default Python on your system, using the Canopy Preferences Menu (you may need to set this, exit Canopy, then restart Canopy to check that it was set).
2) Download python‑igraph‑0.7.0.win‑amd64‑py2.7.exe
from http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-igraph
3) Run the above installer. This will install python-igraph
You should then be able to import debacl successfully.
Upvotes: 2