JuliaPy / JuliaPy/PyCall.jl

Issue pointing Pycall to Virtualenv

Abierto
#867 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Julia
Estrellas
1.5k
Forks
186
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I have a python 3.8 environment named *myenv* created using virtualenv that I am attempting to use with PyCall.
The instructions in the readme to interface PyCall with virtual environments is yielding unexpected behaviour.
- https://github.com/JuliaPy/PyCall.jl#python-virtual-environments

The issue is as follows -

Suppose *myenv* is installed at `/home/myenv`. All the python executables in `/home/myenv/bin` are symbolically linked to `/usr/bin`.

Following instructions in the readme, I activated *myenv*, opened the julia repl, and attempted to point PyCall to *myenv* via `ENV["PYCALL_JL_RUNTIME_PYTHON"] = /home/myenv/bin/Python3.8`

Unfortunately after issuing `using PyCall`, issuing `pyimport("sys").executable` returns `/home/myenv/bin/Python3.8`. Thus PyCall fails when attempting to import packages installed only in *myenv*.

Anyone have any idea why PyCall is not pointed to *myenv* after following the readme instructions? If I were a betting man, I'd bet something with the symlink is causing issue.

I am using Python3.8, Julia 1.3.1 on linux.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza con la sección del README sobre los entornos virtuales de Python y reproduce la configuración en un REPL de Julia usando ENV["PYCALL_JL_RUNTIME_PYTHON"] y /home/myenv/bin/Python3.8. Compara pyimport("sys").executable con los paquetes disponibles en la virtualenv, incluido el efecto de sus enlaces simbólicos; se considerará terminado cuando se haya identificado por qué no se pueden importar los paquetes instalados únicamente en myenv y se haya documentado una corrección fiable.

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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.