Open alhirzel opened 2 years ago
It doesn't require the internet. You can build PyCall to use a local, pre-installed Python distribution by setting the PYTHON
environment variable.
Moreover, this is about building — i.e. installing — PyCall. (It's possible to install Julia packages without Internet access, but quite annoying.) Even if it was built with the Conda Python, PyCall doesn't require Internet access to use it.
Hey @stevengj, you're right--I shouldn't have said "to use" PyCall, I should have said to build it. Subsequent ]build
s of PyCall will still hit the Conda.add
. I think it may be better to check if numpy
is installed rather than unconditionally installing it. This enables one to generate a deployment environment that can ]build
in-place.
I see. Yes, it seems straightforward to check whether conda list
includes numpy
before adding.
Yes, i had fixed in the following way: have a try to do as @stevengj suggested, install numpy, then have a collision with package mkl at path ../.julia/3/pkgs/mkl***, deleted that directory and retry download, then after had successfully downloaded numpy, built PyCall with using Pkg;Pkg.build("PyCall"))
I encountered the problem of PyCall building error and track this post. Although I am not sure how it works behind the surface, I am also sharing my experiences here.
I encounter the problem after the installation of Conda.jl. The error message was that there was no file found at path ./.julia/3/pkgs/mkl***.
And I opened the anaconda navagator and found there was an environment named "x86_64".
I somehow remember it was created by the Julia program, so installed the matplotlib and the numpy packages into this environment using anaconda navagator GUI.
After the previous installation, I am able to build PyPlot and PyCall in the Julia REPL.
Currently, there is a call to
Conda.add("numpy")
:https://github.com/JuliaPy/PyCall.jl/blob/3c66d9ea6d6c2166e11dece15b12335c24648e59/deps/build.jl#L78-L80
This call should be redundant per README:
https://github.com/JuliaPy/PyCall.jl/blob/3c66d9ea6d6c2166e11dece15b12335c24648e59/README.md#L253
I suggest this call be removed, eliminating the need to access the internet when using PyCall.jl. This is an important use case in some environments.
This has also come up in #742.