2

I am struggling to install sentinel sat. After exhausting all my options I have decided to ask if someone can just guide me in the right direction.

Firstly I tried simply:

sudo apt-get install sentinelsat

and I got this error:

sudo apt-get install sentinelsat
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package sentinelsat

Upon finishing some research on this I realized that it is probably because I was still running Ubuntu 17.10. So I updated my entire system and currently running Ubuntu 18.04.1.

So I thought my problem is solved. Again

sudo apt-get install sentinelsat

Same error.

I then tried to look for some tutorials on sentinelsat.

Followed the following:

https://pypi.org/project/sentinelsat/

In this tutorial is says I must use:

pip install sentinelsat

Got the following error:

Collecting sentinelsat
  Using cached https://files.pythonhosted.org/packages/2b/e1/ddf8474a77b9e8ebfd7b181c31a50df229c27ba57031fa9dfe61d7a17fe5/sentinelsat-0.12.2-py2.py3-none-any.whl
Requirement already satisfied: six in ./.local/lib/python2.7/site-packages (from sentinelsat)
Requirement already satisfied: requests in ./.local/lib/python2.7/site-packages (from sentinelsat)
Collecting tqdm (from sentinelsat)
  Using cached https://files.pythonhosted.org/packages/c7/e0/52b2faaef4fd87f86eb8a8f1afa2cd6eb11146822033e29c04ac48ada32c/tqdm-4.25.0-py2.py3-none-any.whl
Requirement already satisfied: click in ./.local/lib/python2.7/site-packages (from sentinelsat)
Collecting geojson>=2 (from sentinelsat)
  Using cached https://files.pythonhosted.org/packages/8d/39/231105abbfd2332f108cdbfe736e56324949fa9e80e536ae60a082cf96a9/geojson-2.4.0-py2.py3-none-any.whl
Collecting html2text (from sentinelsat)
Collecting geomet (from sentinelsat)
Requirement already satisfied: idna<2.8,>=2.5 in ./.local/lib/python2.7/site-packages (from requests->sentinelsat)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python2.7/site-packages (from requests->sentinelsat)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.local/lib/python2.7/site-packages (from requests->sentinelsat)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in ./.local/lib/python2.7/site-packages (from requests->sentinelsat)
Installing collected packages: tqdm, geojson, html2text, geomet, sentinelsat
Exception:
Traceback (most recent call last):
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/tqdm'
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

As the error recommended at the last line I tried to upgrade pip:

    pip install --upgrade pip

Same error as the previous one

Running out of options I tried sudo apt-get again and did some research.

Looked at the following discussion:

https://askubuntu.com/questions/378558/unable-to-locate-package-while-trying-to-install-packages-with-apt

and in this discussion it said I must check if the package actually exists.

https://packages.ubuntu.com/

Strangly no sentinelsat package exist according to this website.

So I am really out of options and was wondering if someone can help me. Is the problem with my ubuntu, pip, sentinelsat I dont know.

As Ian recommended I tried to install it in a virtualenv. Activated the virtualenv successfully and got the following error:

jaun@jaun-pc:~/sentinelsat/bin$ cd ~/
jaun@jaun-pc:~$ pip install sentinelsat
Collecting sentinelsat
  Using cached https://files.pythonhosted.org/packages/2b/e1/ddf8474a77b9e8ebfd7b181c31a50df229c27ba57031fa9dfe61d7a17fe5/sentinelsat-0.12.2-py2.py3-none-any.whl
Requirement already satisfied: six in ./.local/lib/python2.7/site-packages (from sentinelsat)
Requirement already satisfied: requests in ./.local/lib/python2.7/site-packages (from sentinelsat)
Collecting tqdm (from sentinelsat)
  Using cached https://files.pythonhosted.org/packages/c7/e0/52b2faaef4fd87f86eb8a8f1afa2cd6eb11146822033e29c04ac48ada32c/tqdm-4.25.0-py2.py3-none-any.whl
Requirement already satisfied: click in ./.local/lib/python2.7/site-packages (from sentinelsat)
Collecting geojson>=2 (from sentinelsat)
  Using cached https://files.pythonhosted.org/packages/8d/39/231105abbfd2332f108cdbfe736e56324949fa9e80e536ae60a082cf96a9/geojson-2.4.0-py2.py3-none-any.whl
Collecting html2text (from sentinelsat)
Collecting geomet (from sentinelsat)
Requirement already satisfied: idna<2.8,>=2.5 in ./.local/lib/python2.7/site-packages (from requests->sentinelsat)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python2.7/site-packages (from requests->sentinelsat)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.local/lib/python2.7/site-packages (from requests->sentinelsat)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in ./.local/lib/python2.7/site-packages (from requests->sentinelsat)
Installing collected packages: tqdm, geojson, html2text, geomet, sentinelsat
Exception:
Traceback (most recent call last):
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/home/jaun/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/tqdm'
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
2

Your pip error has nothing to do with the version of pip, and every thing to do with permissions. By default pip will try to install into a system directory where all users can see it. While this may be fine on a windows box under linux it fails because you don't have permission to write there, hence the actual error:

OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/tqdm

So you can either install it as root (bad idea) or install in a virtual environment (much better idea):

virtualenv sentinelsat
cd sentinelsat
. ./bin/activate
pip install sentinelsat

should do it, certainly works on my Ubuntu 16.04 box.

  • Hi Ian. Thanks for the quick response. I have done exactly that without any luck. Got the same error. – Jaun van Loggerenberg Sep 5 '18 at 12:56
  • did the virtual environment start up correctly? – Ian Turton Sep 5 '18 at 13:03
  • Yes sir it did. I had to install it first on my system. Thereafter activated it and in that directory tried to install without any luck. – Jaun van Loggerenberg Sep 5 '18 at 13:13
  • is it exactly the same error? – Ian Turton Sep 5 '18 at 13:14
  • Ian I have edited my original question for your information. It does seem as though there is some slight difference. I am also trying to figure out what this error mean. I do appreciate the help – Jaun van Loggerenberg Sep 5 '18 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.