julia> using PyVirtualenv
julia> PyVirtualenv.activate("PATH/TO/bin/python")
julia> using PyCallActivate a Python virtualenv via Pipenv
julia> using PyVirtualenv
julia> PyVirtualenv.activate_pipenv("PATH/TO/Pipfile")
julia> using PyCallIn the directory $PROJECT where Project.toml and Pipfile exist,
create a file called activate.jl with:
import Pkg
Pkg.activate(@__DIR__)
import PyVirtualenv
PyVirtualenv.activate_pipenv(@__DIR__)Then you can start a Julia REPL with Julia and Python environments activated together by:
$ cd $PROJECT
$ julia -i activate.jlTo run a Julia script with all Julia and Python dependencies of $PROJECT,
run
include("$PROJECT/activate.jl")in the very beginning of the script.
Note that pkg> instantiate and shell> pipenv install still have to
be run manually when using the project for the first time.