0

I have pip 18.1 with python 3.6 and would like to install the earthengine-api so I typed pip install earthengine-api in a command prompt.

I got the following error message:

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x06345BF0>, 'Connection to 10.168.209.72 timed out. (connect timeout=15)')': /simple/earthengine-api/ Could not find a version that satisfies the requirement earthengine-api (from versions: ) No matching distribution found for earthengine-api

I tried set | find "proxy" and it gave:

https_proxy=http://xx.xxx.xxx.xx:xxxx  
http_proxy=http://xx.xxx.xxx.xx:xxxx  
no_proxy=xxx.xxx.xxx.xx,xxx.0.0.1

while pip config list | find "proxy" gave:

FIND: Parameter format not correct

I don't understand the error message but suspected the protections of my work PC (of which I am not administrator) to be responsible for this issue, So I decided to install python on a home PC with
pip install earthengine-api
but in jupyter notebook I got "no module ee"
So I installed it with
conda install –c conda-forge earthengine-api
and now it works in jupyter (don't ask me why).

Kevin Reid
  • 37,492
  • 13
  • 80
  • 108
Kekes
  • 1
  • 2
  • What is the question exactly?? – droptop Dec 13 '20 at 13:33
  • Question 1: Why did I get I ConnectTimeoutError when installing earthengine-api? I assumed it had to see with my PC configuration (but what exactly?) so I changed PC and it worked. Question 2: earthengine was installed successfully ,however it did not work in the Jupyter notebook (and I have the same problem with Geopandas, which I had to install through 5 different packages), so what should I do? I found out I should use conda to install earthengine and I think this may be helpful for others. For Geopandas, I am still searching for a solution. – Kekes Dec 14 '20 at 18:19

1 Answers1

0

Your first installation of the earthengine-api package with pip installed the it as a system wide package, and probably not in a conda environment.

The python interpreter used by jupyter would I suppose be in the base environment of your conda installation, and so will only look for a requested package in that environment.

Try using conda to install your packages before resorting to pip. Checkout the guide here https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html

droptop
  • 1,372
  • 13
  • 24
  • Thank you @droptop. Do you mean installing geopandas with: `conda install --channel conda-forge geopandas` I am trying this way but it seems that it is taking a lot of time; I will probably abort it. or do you mean creating a new environment (e.g. mymap) and installing geopandas with `conda create --name mymap geopandas`? or installing each package separately in this new environment using `conda create --name mymap fiona...` etc? – Kekes Dec 15 '20 at 22:45
  • See See https://towardsdatascience.com/a-guide-to-conda-environments-bc6180fc533 for a better understanding of environments and why you'll want to use them/ – droptop Dec 16 '20 at 07:16