This post is just some minor issue I ran into, but it might be nice for 
others to find a fix here.


Trying to get the package PyCall (https://github.com/stevengj/PyCall.jl) to 
import modules (e.g. python3-numpy), this error occurs:

julia> using PyCall

julia> @pyimport numpy
ERROR: PyError (PyImport_ImportModule) <type 'exceptions.ImportError'>
ImportError('No module named numpy',)


To make PyCall work with python3, the following environment variable needs 
to be set:

julia> ENV["PYTHON"]="python3"


If that doesn't work, try:

julia> ENV["PYTHON"]="/usr/bin/python3"


PyCall should now be able to import the python3-* modules which are 
installed via Ubuntu's package manager.

Reply via email to