Python (anaconda) add packages with pip behind proxy

1.9k views Asked by At

sorry for asking a probalby stupid question, however, I am completely new to setting up/installing python packages, i.e. I have never done it. So far I installed anaconda3 and worked with the pre installed packages. Now I need the google api pyhon client. I do not even know whether pip is installed in the anaconda package but I assume it.

What have I tried so far:

In Windows cmd:

1. pip install --upgrade google-api-python-client
2. pip install -- proxy="XXX.XXX.XX.X:XX" -- upgrade google-api-python-client
3. export https_proxy="...."
   pip install --upgrade google-api-python-client

I get the following errors:

  1. cannot fetch index base url https://pypi.python.org/simple
  2. unknown command
  3. unknown command

In addition I tried to download the google_api_python_client and unzipped it. However, I do not know how to proceed here.

BTW: Here in my company we are still on XP

Any help would be highly appreciated!

THANK YOU

2

There are 2 answers

0
Alok Nayak On

After unzipping google_api_python_client. You should run the setup.py file

    python setup.py

Also you can edit ".condarc" file in your home folder, as explained here http://conda.pydata.org/docs/config.html . enter your proxy details there

0
kapibarasama On

Would like to add to the answer by @alok-nayak that you should use the following:

python setup.py install

Leads to:

Installed ~/anaconda/lib/python2.7/site-packages/google_api_python_client-1.4.2-py2.7.egg