Python Anaconda Proxy Setup via .condarc file on Windows
Sebastian Wright
I am having trouble going through a proxy for Anaconda install conda on a Windows 7 machine. How do I use a proxy?
the above link is broken, use this one instead
4 Answers
I had to create a .condarc file at the C:\Users\username folder.
Use copy con .condarc file if it does not exist at folder above.
File content is:
proxy_servers: http: https: Two notes:
- Do not use tabs, there must be space between
http:and - You might not have a username and password for the proxy. Leave out the
username:passwordpart and it will still work
On Windows 10 you need to set up additionally the domain name in the .condarc:
channels: - admin
show_channel_urls: true
allow_other_channels: true
proxy_servers: http: https:
ssl_verify: true 4 On windows 10 machine also. Following accepted answer's format gives a load error, invalid YAML.
Changing '//' to '\' fixed the issue for me.
proxy_servers: http: http:\username::8080 https: https:\username::8080 In my case on a linux machine behind a McAfee web-gateway proxy, only the following setup worked for conda (I removed the http proxy): hostname:~ # cat .condarc proxy_servers: https: \user:password@server:port
hostname# conda install tensorflow Solving environment: done
Package Plan
environment location: /anaconda3
added / updated specs: - tensorflow
The following packages will be downloaded:
package | build
---------------------------|-----------------
markdown-3.0.1 | py36_0 107 KB
gast-0.2.0 | py36_0 15 KB
libprotobuf-3.6.0 | hdbcaa40_0 4.1 MB
protobuf-3.6.0 | py36hf484d3e_0 610 KB
conda-4.5.12 | py36_0 1.0 MB
termcolor-1.1.0 | py36_1 7 KB
tensorflow-base-1.9.0 |mkl_py36h2ca6a6a_0 75.7 MB
grpcio-1.12.1 | py36hdbcaa40_0 1.7 MB
astor-0.7.1 | py36_0 43 KB
tensorboard-1.9.0 | py36hf484d3e_0 3.3 MB
tensorflow-1.9.0 |mkl_py36h6d6ce78_1 3 KB
absl-py-0.6.1 | py36_0 152 KB
_tflow_190_select-0.0.3 | mkl 2 KB
------------------------------------------------------------ Total: 86.7 MBThe following NEW packages will be INSTALLED:
_tflow_190_select: 0.0.3-mkl
absl-py: 0.6.1-py36_0
astor: 0.7.1-py36_0
gast: 0.2.0-py36_0
grpcio: 1.12.1-py36hdbcaa40_0
libprotobuf: 3.6.0-hdbcaa40_0
markdown: 3.0.1-py36_0
protobuf: 3.6.0-py36hf484d3e_0
tensorboard: 1.9.0-py36hf484d3e_0
tensorflow: 1.9.0-mkl_py36h6d6ce78_1
tensorflow-base: 1.9.0-mkl_py36h2ca6a6a_0
termcolor: 1.1.0-py36_1The following packages will be UPDATED:
conda: 4.5.4-py36_0 --> 4.5.12-py36_0Proceed ([y]/n)? y
Downloading and Extracting Packages markdown-3.0.1 | 107 KB | ####################################### | 100% gast-0.2.0 | 15 KB | ####################################### | 100% libprotobuf-3.6.0 | 4.1 MB | ####################################### | 100% protobuf-3.6.0 | 610 KB | ####################################### | 100% conda-4.5.12 | 1.0 MB | ####################################### | 100% termcolor-1.1.0 | 7 KB | ####################################### | 100% tensorflow-base-1.9. | 75.7 MB | ####################################### | 100% grpcio-1.12.1 | 1.7 MB | ####################################### | 100% astor-0.7.1 | 43 KB | ####################################### | 100% tensorboard-1.9.0 | 3.3 MB | ####################################### | 100% tensorflow-1.9.0 | 3 KB | ####################################### | 100% absl-py-0.6.1 | 152 KB | ####################################### | 100% _tflow_190_select-0. | 2 KB | ####################################### | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done