Reputation: 271
I am trying to run a simulator called FLOWUnsteady. At one point, Julia complains:
ERROR: LoadError: InitError: PyError ($(Expr(:escape, :(ccall(#= C:\Users\dsfjk\.julia\packages\PyCall\L0fLP\src\pyfncall.jl:43 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'ModuleNotFoundError'>
ModuleNotFoundError("No module named 'scipy'")
but at the same time:
'''
julia> Pkg.add("SciPy")
Resolving package versions...
No Changes to C:\Users\dsfjk\.julia\environments\v1.7\Project.toml
No Changes to C:\Users\dsfjk\.julia\environments\v1.7\Manifest.toml
'''
How does it not see the package it itself installed?
Upvotes: 1
Views: 766
Reputation: 42244
Looking at the error Julia tries to load scipy
via the PyCall
and does not see it.
The easiest way to replicate it would be:
using PyCall
pyimport("scipy")
Assuming you will see the same error, the problem is that the module SciPy.jl
does not install Python scipy until it is used for the first time. This can be solved easily by loading the module:
julia> using SciPy
[ Info: Installing scipy via the Conda scipy package...
[ Info: Running `conda install -y scipy` in root environment
...
Another option is to add Python scipy manually to your Julia installation:
using Conda
Conda.add("scipy")
Upvotes: 1