Installation Cartopy

Asked

Viewed 198 times

0

I’m trying to install the cartopy library. But I’m not getting it. Can someone help me? I tried by pypi and returned the following error:

C:\Users\Rafa>pip install cartopy

Collecting cartopy
  Using cached Cartopy-0.15.1.tar.gz
Exception:
Traceback (most recent call last):
  File "c:\users\rafa\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
    return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 9: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\rafa\appdata\local\programs\python\python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\rafa\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\install.py", line 335, in run
    wb.build(autobuilding=True)
  File "c:\users\rafa\appdata\local\programs\python\python36-32\lib\site-packages\pip\wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "c:\users\rafa\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "c:\users\rafa\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "c:\users\rafa\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "c:\users\rafa\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
  File "c:\users\rafa\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
    line = console_to_str(proc.stdout.readline())
  File "c:\users\rafa\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
    return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 9: invalid continuation byte

I tried also by anaconda and returns that can only be installed with version 3.6 of python, but I have version 3.6 and 3.6.3 already installed

(C:\Users\Rafa\Anaconda3) C:\Users\Rafa\Documents>conda install -c scitools cartopy
Fetching package metadata ...............
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict:
  - cartopy -> numpy 1.8* -> python 2.6*
  - python 3.6*
Use "conda info <package>" to see the dependencies for each package.
  • Rafael, why did you delete the question? I was answering with some guidelines regarding your code.

2 answers

1

Try using:

Conda install -c Conda-Forge cartopy=0.15.1

1


Completing the @Vegas response, according to documentation ( In English ) the easiest way to install the Cartopy in all Platforms is using the Conda, with the following command.

conda install -c conda-forge cartopy

You can also install from the source code available on Github, after cloning the repository, execute the command on Terminal, Power Shell, etc...:

python setup.py install

The Cartopy requisition of the package python-numpy if using distributions Linux, can install from command:

apt-get install python-numpy

You may need to install the Developing, for this use the command:

apt-get install python-numpy-dev
  • I used this command. It install normally, but cartopy does not appear in python’s site-packges folder. When I try to import the cartopy module comes the warning that there is no module called cartopy

  • >>> import cartopy as ct Traceback (Most recent call last): File "<stdin>", line 1, in <module> Modulenotfounderror: No module named 'cartopy'

  • You only have one version of Python installed ?

  • a 3.6.3. It seems to me that the cartopy is only working in 3.4. I will test it. Doubt: when installing the new python, I will have to install the packages again?

  • Yes, always when the different versions as far as I know have to install

Browser other questions tagged

You are not signed in. Login or sign up in order to post.