Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the proxy provided in .condarc for pip packages in the environment.yml?

I have to use a proxy, which I have configured in the .condarc file, for conda work, which works perfectly fine. However when I'm setting up a new python environment with an environment.yml file, which could look like this:

name: Test
channels:
  - intel
  - defaults
dependencies:
  - pypdf2=1.26.0=py36_1
  - mkl=2018.0.2=1
  - pip:
    - adjusttext==0.7.2
prefix: C:\ProgramData\Anaconda3\envs\Test

Pip doesn't use the provided proxy to install those packages, so I get an error. How can I get pip to use that proxy as well?

like image 930
raui100 Avatar asked Oct 14 '25 14:10

raui100


1 Answers

Struggled with this issue a lot working on Win10. When modifying https_proxy I had issues with git, but with a file pip.ini in C:\ProgramData\pip\ as C:\ProgramData\pip\pip.ini it works finally:

pip.ini:

[global]
timeout = 10
proxy=http://myproxy:8080
cert = C:\Users\Public\mycert.cer

now I can install conda environments with included pip packages

for more infos for default location visit: https://pip.pypa.io/en/stable/user_guide/

like image 191
K0ertis Avatar answered Oct 19 '25 01:10

K0ertis