JuliaPy / JuliaPy/PyCall.jl

Issue pointing Pycall to Virtualenv

Aperta
#867 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
1.5k
Fork
186
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.