Closed moble closed 3 years ago
Could you show us some of the errors?
The second (3.8) example above gives me this:
The issue you are encountering is that conda
cannot figure out how to install numpy
into the environment you just created. I suggest creating the environment with the following command conda create -y -n julia_test38 python=3.8 numpy
.
PyCall.jl uses conda
to install numpy
since it needs that package in order to translate some Julia arrays to Python. The conflicts you are seeing are because you initially created an environment where conda cannot find an appropriate numpy
to install due to library mismatch.
No, that's not it. Numpy was actually in the original env I was trying to use before I cut it down to a MWE, but even if I run it again with your suggested addition, I get similar errors:
Is there anything more on this list of things PyCall
is trying to install?
The only thing I aware of is numpy
:
https://github.com/JuliaPy/PyCall.jl/blob/8a98fb45ef39d09e11c1270e9120a32df2578d50/deps/build.jl#L84
Can you reproduce the problem with you do using Conda; Conda.add("numpy")
? Maybe there is a default channel issue?
Your mention of channels led me to disable my ~/.condarc
file (which sets conda-forge as the higher-priority channel) and start over from scratch. In that case, Conda.add("numpy")
runs to completion, but it also doesn't give me the desired behavior. It starts out by installing miniconda inside my test env, and in doing so it upgrades to python 3.9 — which will eliminate my ability to install the packages I need.
(Also, I actually would like to use conda-forge as the higher-priority channel. I use conda heavily in non-julia life, including maintaining a number of packages, and I know that it works better with conda-forge on top. But this is secondary to just having the right python version.)
Here's the full output:
I'm sorry that we have not found a solution to this yet. I recommend that you create an issue on Conda.jl, and pursue the issue there. This may require rebuilding Conda.jl with your test environment active. I would also examine the deps.jl file for Conda.jl.
Thanks for your help narrowing it down to Conda.jl. :)
I have a conda env that requires python 3.8 (one of the packages doesn't support 3.9 yet). I'd really like to use it from julia, but that doesn't seem to be possible. The problem seems to be python 3.8 itself, rather than any of my dependencies.
I can imagine that the newest PyCall just requires 3.9, and I'll have to downgrade to get it working, but it would be really nice to get some guidance on this — preferably from PyCall itself. Currently, it fails with a huge list of bizarre errors, and then seems to try to install miniconda inside my existing conda env directory. I suspect this is the same problem seen in #776, but really cut down to basics.
I've pared the MWE down as far as possible, with just python in the conda env (and whatever conda decides is strictly necessary to install python).
Works with default python
In a new tmp directory,
That works just fine. I can test that it's doing what I expect with
Doesn't work with python=3.8
In another new tmp directory, with a fresh shell to make sure ENV isn't doing something weird,
This dies as described above.