Knowledge Base/Canopy/Canopy on Linux

ImportError: libmkl_intel_lp64.so: cannot open shared object file

Jonathan March
posted this on June 02, 2013 15:05

Problem:

In Canopy 1.0.0 (beta) for Linux,  running Canopy Python from terminal, you may see something like the following:

(User) $ python
Enthought Canopy Python 2.7.3 | 64-bit | (default, Mar 25 2013, 15:55:17) >>> import numpy Traceback (most recent call last): ...
**ImportError: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory**

Solution: 

This is due to a bug in Canopy's use of virtual environments in Linux. This will be fixed in Canopy 1.0.3 (due in late June). 

Workaround:

When starting Canopy Python from the command line, explicitly specify the full path to the Canopy User Python. 

An easy way to do this is to define an alias for "python" which explicitly includes this full path. Assuming that you have placed Canopy User python on your PATH, one way to define such an alias is:

alias python=$(which python)

 

 

Comments

User photo
Nan Wang

hi, Jonathan.
This workaround actually doesn't work for me. If I add this line in such a way:

alias python=$(which python)
VIRTUAL_ENV_DISABLE_PROMPT=1 source [...] activate

It works but I found that it is not using multi-cores at all.

If I put it in this way:

VIRTUAL_ENV_DISABLE_PROMPT=1 source [...] activate
alias python=$(which python)

I got the error below,

ImportError: Matplotlib backend_wx and backend_wxagg require wxPython >=2.8
June 07, 2013 09:05
User photo
Pankaj
Enthought

@Nan Wang,The matplotlib ImportError is a different issue than this, and happens because canopy does not include wx by default, but includes Qt and PySide. You can try qt backend for matplotlib with QT_API=pyside

June 12, 2013 01:57