-
Notifications
You must be signed in to change notification settings - Fork 65
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
Error when using PythonCall attached to a previous Conda environment. #224
Comments
See here: https://cjdoris.github.io/PythonCall.jl/stable/pythoncall/#If-you-don't-want-to-use-Conda I think you just need ENV["JULIA_PYTHONCALL_EXE"] = "/home/mmestre/.conda/envs/cosmos/bin/python3.9" You must also ensure your Conda environment is activated before starting Julia, since CondaPkg is not used if you specify the python executable. |
Thanks @cjdoris. It worked! The commands:
must be applied once before installing PythonCall, or each time I run Julia? I think I didnt understand. I followed the instructions named: "If you already have Conda, Mamba or MicroMamba" so I guess I wnat to use conda (my conda environment) but not CondaPkg. |
Hello @cjdoris, I do not understand why your command Alternatively I also tried to use CondaPkg but I have a Python packages that is installed like this and it gave me errors. |
OK, maybe the wording of those instructions could be made clearer: by "use Conda" I really mean "use CondaPkg to automatically create a new Conda environment with all your dependencies", which is not what you want, since you want to re-use an existing environment. By setting It should not be necessary to set any other environment variables if you are only using PythonCall, but you can also set These env vars need to be set every session. To do this automatically you can do this in your |
Thanks! Ok, so I think I have understood almost everything. I have been able to use PythonCall with a previous conda env by setting only: |
|
I've reworded the docs a bit, I'd be grateful if you could read and tell me if they are clearer: https://cjdoris.github.io/PythonCall.jl/dev/pythoncall/#pythoncall-config |
Thanks, of course I will read it.
Right? |
Yes, the |
Thank you a lot! issue closed! |
Hello,
I would be very gratefull to understand what is the problem. I followed the instructions:
Then I install PythonCall.
When I try to use it I get an error (I do have astropy installed in the cosmos environment):
I also tried with
julia > ENV["JULIA_CONDAPKG_EXE"] = "/home/mmestre/.conda/envs/cosmos/bin/python"
obtaining the same result.
Thank you very much in advance.
The text was updated successfully, but these errors were encountered: