Cannot build PyCall using existing Conda env; 100s of dependency conflicts
- Lenguaje dominante
- Julia
- Estrellas
- 1.5k
- Forks
- 186
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hello, one of the modules in my project relies on calls to dozens of Python modules, so I thought I can use an existing Conda environment, which I built from a .yml file given by someone else. I added PyCall with `Pkg.add()`, then set `ENV["PYTHON"] = "/Users/qingyanz/opt/anaconda3/envs/pymatg/bin/python3"`, then used `Pkg.build("PyCall")`.
PyCall refused to build due to 100s of dependency conflicts, and the error log is given below. I then realized that PyCall only supports virtual environments created with `venv` and `virtualenv`, and NOT `conda`, and tried to revert to Julia's default vanilla Python distribution by setting `ENV["PYTHON"] = ""`, but the error message remained exactly the same. I tried reinstalling PyCall, deleting all relevant directories, and browsed all relevant question threads, but nothing seems to work. Therefore, I will deeply appreciate your input.
```
PREFIX=/Users/qingyanz/opt/anaconda3/envs/pymatg
#=
# Hundreds of Python package conflict info redacted here
#=
Package matplotlib-base conflicts for:
pymatgen -> matplotlib-base[version='>=1.5']
matplotlib-base
ase -> matplotlib -> matplotlib-base==3.1.3=py38h11da6c2_0
Package pydispatcher conflicts for:
pymatgen -> pydispatcher[version='>=2.0.5']
pydispatcher
Package tabulate conflicts for:
pymatgen -> tabulate
tabulate
Package traitlets conflicts for:
ipython -> traitlets[version='>=4.2']
traitlets
┌ 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/qingyanz/opt/anaconda3/envs/pymatg/installer.sh -b -f -p /Users/qingyanz/opt/anaconda3/envs/pymatg`, ProcessExited(1)) [1]
Stacktrace:
[1] run(::Cmd; wait::Bool) at /Applications/JuliaPro-1.4.1-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[2] run at ./process.jl:438 [inlined]
[3] _install_conda(::String, ::Bool) at /Users/qingyanz/.juliapro/JuliaPro_v1.4.1-1/packages/Conda/3rPhK/src/Conda.jl:169
[4] _install_conda(::String) at /Users/qingyanz/.juliapro/JuliaPro_v1.4.1-1/packages/Conda/3rPhK/src/Conda.jl:155
[5] runconda(::Cmd, ::String) at /Users/qingyanz/.juliapro/JuliaPro_v1.4.1-1/packages/Conda/3rPhK/src/Conda.jl:112
[6] add(::String, ::String; channel::String) at /Users/qingyanz/.juliapro/JuliaPro_v1.4.1-1/packages/Conda/3rPhK/src/Conda.jl:188
[7] add at /Users/qingyanz/.juliapro/JuliaPro_v1.4.1-1/packages/Conda/3rPhK/src/Conda.jl:187 [inlined] (repeats 2 times)
[8] top-level scope at /Users/qingyanz/.juliapro/JuliaPro_v1.4.1-1/packages/PyCall/zqDXB/deps/build.jl:84
[9] include(::String) at /Applications/JuliaPro-1.4.1-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[10] top-level scope at none:5
[11] eval(::Module, ::Any) at /Applications/JuliaPro-1.4.1-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[12] exec_options(::Base.JLOptions) at /Applications/JuliaPro-1.4.1-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[13] _start() at /Applications/JuliaPro-1.4.1-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
in expression starting at /Users/qingyanz/.juliapro/JuliaPro_v1.4.1-1/packages/PyCall/zqDXB/deps/build.jl:43
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza con deps/build.jl de PyCall y los stack frames de Conda.jl mostrados en el informe; después reproduce Pkg.build("PyCall") con los valores indicados de ENV["PYTHON"]. Se considera terminado cuando se comprende el comportamiento de la compilación para el entorno de Conda existente y la configuración de fallback, y el fallo informado se ha corregido o diagnosticado claramente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100