JuliaPy / Conda.jl

Conda managing Julia binary dependencies
Other
171 stars 57 forks source link

how to correctly set the proxy in `.condarc` file #235

Open thudjx opened 1 year ago

thudjx commented 1 year ago

I am install a private python distribution in julia, but Conda seems to have a proxy error:

julia>ENV["PYTHON"]=""
julia> build PyCall
julia>
Building PyCall → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/62f417f6ad727987c755549e9cd88c46578da562/build.log`
ERROR: Error building `PyCall`:
WARNING: failed to select UTF-8 encoding, using ASCII
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Collecting package metadata (current_repodata.json): ...working... failed

ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any '.netrc' file in your home directory,
any environment variables ending in '_PROXY', and any other system-wide proxy
configuration settings.
...

I have to use the proxy so that the remote server is connected to the Internet. I searched the internet there are some solutions that set the proxy in .condarc file. So I tried to set the location of the this file:

julia> Conda.conda_rc("/home/dongjx/.condarc")
ERROR: ArgumentError: Path to conda environment is not valid: /home/dongjx/.condarc
Stacktrace:
 [1] prefix
   @ ~/.julia/packages/Conda/kOnIE/src/Conda.jl:42 [inlined]
 [2] conda_rc(env::String)
   @ Conda ~/.julia/packages/Conda/kOnIE/src/Conda.jl:87
 [3] top-level scope
   @ REPL[6]:1

So how can I set proxy for Conda.jl to resume the installation?

brainsMAKER commented 2 months ago

I have similar issues. If anyone has a reliable answer, I would be very grateful 🥲