PyCall installation problem?

Hi,
I’m trying to update PyPlot and IJulia, but the update/addition stalls – it seems like the problem is PyCall:

julia> Pkg.add(“PyCall”)
INFO: Installing PyCall v1.15.0
INFO: Building Conda
INFO: Building PyCall
INFO: Using the Python distribution in the Conda package by default.
To use a different Python version, set ENV[“PYTHON”]=“pythoncommand” and re-run Pkg.build(“PyCall”).
INFO: Downloading miniconda installer …
INFO: Installing miniconda …
INFO: Downloading miniconda installer …
INFO: Installing miniconda …
INFO: Downloading miniconda installer …
INFO: Installing miniconda …
… and then ad infinitum…

Any clues? [I do have both Anaconda 2.7 and 3.x installed for doing some Python work, but that did not create problems in the past.]

Does

using Conda
Conda.add("numpy")

work?

1 Like

Yes,

using Conda

Conda.add(“numpy”)

works.

-B

When I did

using Conda
Conda.add(“numpy”)

the appearance in the REPL was similar to using conda in a Python shell

After that, I did:

Pkg.add(“PyPlot”)

and the REPL appearance was again similar to when using conda (growing bars indicating state of installation, etc.)

Next, installing IJulia, etc. also worked – in summary most things work again. Thanks! [I don’t know what the difference between Conda.add() and Pkg.add(), or why things work now.]

Pkg.* functions are managing Julia packages, while Conda.* is for the packages space managed by conda. Eg python uses the conda, but it can work with other languages, eg R. Conda.jl is Julia’s conda interface for some non-Julia dependencies.

Thanks for clarification. I assume that for packages managed by conda (presumably PyCall, numpy, PyPlot, Ijulia, etc., I can use either Conda.add() or Pkg.add()… (?)

-B

No. Pkg.add() does not directly manage packages by conda. It may do so indirectly, if the build script of the relevant Julia package asks for it.

The PyCall build script just calls Conda.add("numpy"), so I’m not sure why it would be different when you ran it manually. Perhaps it was a temporary network glitch?

Hello,
I do not know if it is the same problem, I try to install PyCall, but I obtain the following error:

Error: Error building PyCall:
│ ERROR: did not recognize option ‘1/.julia/conda/3’, please try -h
┌ Info: Using the Python distribution in the Conda package by default.
│ └ To use a different Python version, set ENV[“PYTHON”]=“pythoncommand” and re-run Pkg.build(“PyCall”).
│ [ Info: Downloading miniconda installer …
│ [ Info: Installing miniconda …
│ ERROR: LoadError: failed process: Process('/Users/ymedinag 1/.julia/conda/3/installer.sh' -b -f -p '/Users/ymedinag 1/.julia/conda/3', ProcessExited(1)) [1]

│ Stacktrace:
│ [1] pipeline_error at ./process.jl:525 [inlined]
│ [2] run(::Cmd; wait::Bool) at ./process.jl:440
│ [3] run at ./process.jl:438 [inlined]
│ [4] _install_conda(::String, ::Bool) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:169
│ [5] _install_conda(::String) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:155
│ [6] runconda(::Cmd, ::String) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:112
│ [7] add(::String, ::String; channel::String) at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:188
│ [8] add at /Users/ymedinag 1/.julia/packages/Conda/3rPhK/src/Conda.jl:187 [inlined] (repeats 2 times)
│ [9] top-level scope at /Users/ymedinag 1/.julia/packages/PyCall/BcTLp/deps/build.jl:84
│ [10] include(::String) at ./client.jl:457
│ [11] top-level scope at none:5
│ in expression starting at /Users/ymedinag 1/.julia/packages/PyCall/BcTLp/deps/build.jl:43
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:949

I use a Mac. Any help will be welcomed.

Thank you in advance.

Anaconda doesn’t install into directories with spaces, which I’m guessing tha you have. (This is out of our control.) You’ll need to either rename your home directory to not use spaces or manually install Python somewhere else and tell PyCall where to find it.

1 Like

Dear support,

I deeply thank you your help. I solved my problem by installing elsewhere without a space.

Best regards.

Yaocihuatl Medina-Gonzalez
CNRS Research Scientist
Chargée de Recherche CNRS
Laboratoire du Futur (LOF UMR CNRS Solvay 5258)
178 Avenue du Dr Albert Schweitzer,
33600 Pessac
yaocihuatl.medina-gonzalez@u-bordeaux.fr
yaocihuatl.medinagonzalez-ext@solvay.com