So I have a python module that I want to load with pycall, but I’m struggling to get it working. I have anaconda 3 python installed on my system, separately from julia, and that python installation has all the usual things (i.e., numpy,scipy, etc.). However, If I try:
@pyimport scipy.optimize as so
I get the error:
PyError (ccall(@pysym(:PyImport_ImportModule), PyPtr, (Cstring,), name)
The Python package scipy.optimize could not be found by pyimport. Usually this means
that you did not install scipy.optimize in the Python version being used by PyCall.
PyCall is currently configured to use the Julia-specific Python distribution
installed by the Conda.jl package. To install the scipy.optimize module, you can
use `pyimport_conda("scipy.optimize", PKG)`, where PKG is the Anaconda
package the contains the module scipy.optimize, or alternatively you can use the
Conda package directly (via `using Conda` followed by `Conda.add` etcetera).
Alternatively, if you want to use a different Python distribution on your
system, such as a system-wide Python (as opposed to the Julia-specific Python),
you can re-configure PyCall with that Python. As explained in the PyCall
documentation, set ENV["PYTHON"] to the path/name of the python executable
you want to use, run Pkg.build("PyCall"), and re-launch Julia.
) <type 'exceptions.ImportError'>
ImportError('No module named scipy.optimize',)
And once I get that straightened out, I want to load a module which is in my PYTHONPATH
when i open a shell, but is not in the standard location.