You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default on Mac and Windows systems, Pkg.add("PyCall") or Pkg.build("PyCall") will use the Conda.jl package to install a minimal Python distribution (via Miniconda) that is private to Julia (not in your PATH). You can use the Conda Julia package to install more Python packages, and import Conda to print the Conda.PYTHONDIR directory where python was installed. On GNU/Linux systems, PyCall will default to using the python3 program (if any, otherwise python) in your PATH. '
PyCall will by default use this julia only conda installation.
You can use Conda.jl to install packages using the methods described here. However the default installed version does not support installing PyPI packages with pip.
It is possible to get PyCall to use an existing Conda installation and point to a virtual env it will name conda_jl as described here. This env can be activated as usual with conda activate conda_jl from the terminal and packages can be installed directly. This workaround is less desirable than the following approach
The latest version experimental version of Conda.jl has support for PyPI packages and can be installed from julia by running,
Pkg.add(PackageSpec(name="Conda", rev="master")
You might need to run Pkg.build("Conda") if Conda is not build automatically. Now, you can run the following code to install a PyPI only package such as cirq,
using Conda
Conda.pip_interop(true)
Conda.pip("install", "cirq")
The text was updated successfully, but these errors were encountered:
This is related to how PyCall is installed in Windows / Mac as opposed to Linux.
From PyCall documentation :
PyCall will by default use this julia only conda installation.
You can use Conda.jl to install packages using the methods described here. However the default installed version does not support installing PyPI packages with pip.
It is possible to get PyCall to use an existing Conda installation and point to a virtual env it will name conda_jl as described here. This env can be activated as usual with
conda activate conda_jl
from the terminal and packages can be installed directly. This workaround is less desirable than the following approachThe latest version experimental version of Conda.jl has support for PyPI packages and can be installed from julia by running,
You might need to run
Pkg.build("Conda")
if Conda is not build automatically. Now, you can run the following code to install a PyPI only package such as cirq,The text was updated successfully, but these errors were encountered: