Shapely - Could not find library geos_c or load any of its variants libgeos_c.so.1, libgeos_c.so

Installing Shapely - OSError: Could not find library geos_c or load any of its variants [‘libgeos_c.so.1’, ‘libgeos_c.so’]

1. sudo pip install shapely - OSError: Could not find library geos_c or load any of its variants [‘libgeos_c.so.1’, ‘libgeos_c.so’]

nvidia@rudi-tx2:~$ sudo pip install shapely
The directory '/home/nvidia/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nvidia/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting shapely
  Downloading https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz (225kB)
    100% |████████████████████████████████| 235kB 1.7MB/s 
    Complete output from command python setup.py egg_info:
    Failed `CDLL(libgeos_c.so.1)`
    Failed `CDLL(libgeos_c.so)`
    Traceback (most recent call last):
      File "", line 1, in 
      File "/tmp/pip-build-3BrRBU/shapely/setup.py", line 80, in 
        from shapely._buildcfg import geos_version_string, geos_version, \
      File "/tmp/pip-build-3BrRBU/shapely/shapely/_buildcfg.py", line 167, in 
        fallbacks=['libgeos_c.so.1', 'libgeos_c.so'])
      File "/tmp/pip-build-3BrRBU/shapely/shapely/_buildcfg.py", line 161, in load_dll
        libname, fallbacks or []))
    OSError: Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so']
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3BrRBU/shapely/
You are using pip version 8.1.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
nvidia@rudi-tx2:~$ 

2. sudo apt autoremove & sudo apt-get update

nvidia@rudi-tx2:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  apt-clone archdetect-deb dmeventd dmraid dpkg-repack gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common kpartx kpartx-boot libappstream3
  libdebian-installer4 libdevmapper-event1.02.1 libdmraid1.0.0.rc16 liblockfile-bin liblockfile1 liblvm2app2.2 liblvm2cmd2.02 libmircommon5
  libparted-fs-resize0 libqmi-glib1 libqpdf17 libreadline5 lockfile-progs lvm2 os-prober pmount python3-icu python3-pam rdate ubiquity-casper
  ubiquity-ubuntu-artwork ubuntu-core-launcher
0 upgraded, 0 newly installed, 33 to remove and 20 not upgraded.
After this operation, 23.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 153311 files and directories currently installed.)
Removing apt-clone (0.4.1ubuntu1) ...
Removing archdetect-deb (1.117ubuntu2.3) ...
Removing lvm2 (2.02.133-1ubuntu10) ...
Warning: Stopping lvm2-lvmpolld.service, but it can still be activated by:
  lvm2-lvmpolld.socket
Warning: Stopping lvm2-lvmetad.service, but it can still be activated by:
  lvm2-lvmetad.socket
Removing dmraid (1.0.0.rc16-4.2ubuntu3) ...
update-initramfs: deferring update (trigger activated)
Removing dpkg-repack (1.41) ...
Removing gir1.2-timezonemap-1.0 (0.4.5) ...
Removing gir1.2-xkl-1.0:arm64 (5.4-0ubuntu2) ...
Removing os-prober (1.70ubuntu3.3) ...
Removing grub-common (2.02~beta2-36ubuntu3.18) ...
Removing kpartx-boot (0.5.0+git1.656f8865-5ubuntu2.5) ...
update-initramfs: deferring update (trigger activated)
Removing kpartx (0.5.0+git1.656f8865-5ubuntu2.5) ...
Removing libappstream3:arm64 (0.9.4-1ubuntu4) ...
Removing libdebian-installer4:arm64 (0.102ubuntu1.1) ...
Removing liblvm2app2.2:arm64 (2.02.133-1ubuntu10) ...
Removing libdmraid1.0.0.rc16 (1.0.0.rc16-4.2ubuntu3) ...
Removing lockfile-progs (0.1.17) ...
Removing liblockfile1:arm64 (1.09-6ubuntu1) ...
Removing liblockfile-bin (1.09-6ubuntu1) ...
Removing libmircommon5:arm64 (0.21.0+16.04.20160330-0ubuntu1) ...
Removing libparted-fs-resize0:arm64 (3.2-15ubuntu0.1) ...
Removing libqmi-glib1:arm64 (1.12.6-1) ...
Removing libqpdf17:arm64 (6.0.0-2) ...
Removing libreadline5:arm64 (5.2+dfsg-3build1) ...
Removing pmount (0.9.23-3) ...
Removing python3-icu (1.9.2-2build1) ...
Removing python3-pam (0.4.2-13.2ubuntu2) ...
Removing rdate (1:1.2-6) ...
Removing ubiquity-casper (1.376.2) ...
Removing ubiquity-ubuntu-artwork (2.21.63.6) ...
Removing ubuntu-core-launcher (2.34.2) ...
Removing dmeventd (2:1.02.110-1ubuntu10) ...
Removing liblvm2cmd2.02:arm64 (2.02.133-1ubuntu10) ...
Removing libdevmapper-event1.02.1:arm64 (2:1.02.110-1ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for initramfs-tools (0.122ubuntu8.11) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
nvidia@rudi-tx2:~$ 
nvidia@rudi-tx2:~$ sudo apt-get update

3. sudo apt-get install libgeos-dev

Shapely 1.6 requires:
Python >= 2.6 (including Python 3.x)
GEOS >= 3.3

nvidia@rudi-tx2:~$ sudo apt-get install libgeos-dev
[sudo] password for nvidia: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libgeos-3.5.0 libgeos-c1v5
Suggested packages:
  libgdal-doc
The following NEW packages will be installed:
  libgeos-3.5.0 libgeos-c1v5 libgeos-dev
0 upgraded, 3 newly installed, 0 to remove and 20 not upgraded.
Need to get 553 kB of archives.
After this operation, 2,711 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 libgeos-3.5.0 arm64 3.5.0-1ubuntu2 [439 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 libgeos-c1v5 arm64 3.5.0-1ubuntu2 [47.1 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 libgeos-dev arm64 3.5.0-1ubuntu2 [67.5 kB]
Fetched 553 kB in 1s (484 kB/s)   
Selecting previously unselected package libgeos-3.5.0.
(Reading database ... 152776 files and directories currently installed.)
Preparing to unpack .../libgeos-3.5.0_3.5.0-1ubuntu2_arm64.deb ...
Unpacking libgeos-3.5.0 (3.5.0-1ubuntu2) ...
Selecting previously unselected package libgeos-c1v5.
Preparing to unpack .../libgeos-c1v5_3.5.0-1ubuntu2_arm64.deb ...
Unpacking libgeos-c1v5 (3.5.0-1ubuntu2) ...
Selecting previously unselected package libgeos-dev.
Preparing to unpack .../libgeos-dev_3.5.0-1ubuntu2_arm64.deb ...
Unpacking libgeos-dev (3.5.0-1ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libgeos-3.5.0 (3.5.0-1ubuntu2) ...
Setting up libgeos-c1v5 (3.5.0-1ubuntu2) ...
Setting up libgeos-dev (3.5.0-1ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
nvidia@rudi-tx2:~$ 

4. sudo pip install shapely

nvidia@rudi-tx2:~$ sudo pip install shapely
The directory '/home/nvidia/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nvidia/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting shapely
  Downloading https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz (225kB)
    100% |████████████████████████████████| 235kB 1.9MB/s 
Installing collected packages: shapely
  Running setup.py install for shapely ... done
Successfully installed shapely-1.6.4.post2
You are using pip version 8.1.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

5. sudo pip install shapely[vectorized] - RequirementParseError: Invalid requirement, parse error at “’__placeh’”

nvidia@rudi-tx2:~$ sudo pip install shapely[vectorized]
The directory '/home/nvidia/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nvidia/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 305, in run
    wheel_cache
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 270, in populate_requirement_set
    wheel_cache=wheel_cache
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 234, in from_line
    extras).extras
  File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2833, in parse
    req, = parse_requirements(s)
  File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2781, in parse_requirements
    yield Requirement(line)
  File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2790, in __init__
    raise RequirementParseError(str(e))
RequirementParseError: Invalid requirement, parse error at "'__placeh'"
You are using pip version 8.1.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

6. sudo pip install --upgrade pip

nvidia@rudi-tx2:~$ sudo pip install --upgrade pip
The directory '/home/nvidia/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nvidia/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
  Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 452kB/s 
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr
Successfully installed pip-18.0
nvidia@rudi-tx2:~$ 

7. sudo pip install shapely[vectorized]

nvidia@rudi-tx2:~$ sudo pip install shapely[vectorized]
The directory '/home/nvidia/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nvidia/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: shapely[vectorized] in /usr/local/lib/python2.7/dist-packages (1.6.4.post2)
Requirement already satisfied: numpy in /usr/lib/python2.7/dist-packages (from shapely[vectorized]) (1.11.0)
nvidia@rudi-tx2:~$ 

你可能感兴趣的:(Python,3.x,-,Python,2.x)