Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Conda.jl for environment handling #1

Open
THinnerichs opened this issue Apr 26, 2023 · 1 comment
Open

Use Conda.jl for environment handling #1

THinnerichs opened this issue Apr 26, 2023 · 1 comment
Assignees

Comments

@THinnerichs
Copy link
Member

We should do the following to install and handle the Python environment from Julia (and not just assume the correct installation):

An alternative is to configure PyCall to use a Julia-specific Python distribution via the Conda.jl package (which installs a private Anaconda Python distribution), which has the advantage that packages can be installed and kept up-to-date via Julia. As explained in the PyCall documentation, set ENV["PYTHON"]="", run Pkg.build("PyCall"), and re-launch Julia. Then, to install the torch module, you can use pyimport_conda("torch", PKG), where PKG is the Anaconda package that contains the module torch, or alternatively you can use the Conda package directly (via using Conda followed by Conda.add etcetera).

@THinnerichs THinnerichs self-assigned this Apr 26, 2023
@IssaHanou
Copy link
Member

You can also use the following code to add packages using pip:

using Conda, PyCall

Conda.pip_interop(true)
Conda.pip("install", "{package}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants