尽管使用pip安装,但未找到pyrender.so

2024-09-30 22:23:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用pip安装了pyrender,但仍然发现一个错误,即pyrender.so未找到。我应该如何修复此错误?我正在使用这个GitHub repo中的代码:https://github.com/davidstutz/mesh-fusion

(tsdf) mona@goku:~/mesh-fusion$ pip install pyrender
Collecting pyrender
  Using cached pyrender-0.1.43-py3-none-any.whl (1.2 MB)
Requirement already satisfied: scipy in /home/mona/venv/tsdf/lib/python3.8/site-packages (from pyrender) (1.6.0)
Requirement already satisfied: numpy in /home/mona/venv/tsdf/lib/python3.8/site-packages (from pyrender) (1.19.5)
Collecting PyOpenGL==3.1.0
  Using cached PyOpenGL-3.1.0-py3-none-any.whl
Collecting pyglet>=1.4.10
  Using cached pyglet-1.5.14-py3-none-any.whl (1.1 MB)
Collecting freetype-py
  Using cached freetype_py-2.2.0-py3-none-manylinux1_x86_64.whl (890 kB)
Collecting imageio
  Using cached imageio-2.9.0-py3-none-any.whl (3.3 MB)
Collecting networkx
  Using cached networkx-2.5-py3-none-any.whl (1.6 MB)
Collecting decorator>=4.3.0
  Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting Pillow
  Using cached Pillow-8.1.0-cp38-cp38-manylinux1_x86_64.whl (2.2 MB)
Collecting six
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting trimesh
  Downloading trimesh-3.9.3-py3-none-any.whl (628 kB)
     |████████████████████████████████| 628 kB 4.4 MB/s 
Requirement already satisfied: setuptools in /home/mona/venv/tsdf/lib/python3.8/site-packages (from trimesh->pyrender) (44.0.0)
Installing collected packages: Pillow, decorator, trimesh, six, PyOpenGL, pyglet, networkx, imageio, freetype-py, pyrender
Successfully installed Pillow-8.1.0 PyOpenGL-3.1.0 decorator-4.4.2 freetype-py-2.2.0 imageio-2.9.0 networkx-2.5 pyglet-1.5.14 pyrender-0.1.43 six-1.15.0 trimesh-3.9.3
WARNING: You are using pip version 20.3.3; however, version 21.0.1 is available.
You should consider upgrading via the '/home/mona/venv/tsdf/bin/python3 -m pip install --upgrade pip' command.
(tsdf) mona@goku:~/mesh-fusion$ python 2_fusion.py --mode=render --in_dir=examples/1_scaled/ --depth_dir=examples/2_depth/ --out_dir=examples/2_watertight/
Traceback (most recent call last):
  File "2_fusion.py", line 10, in <module>
    import librender
  File "/home/mona/mesh-fusion/librender/__init__.py", line 5, in <module>
    ctypes.cdll.LoadLibrary(os.path.join(pyrender_dir, 'pyrender.so'))
  File "/usr/lib/python3.8/ctypes/__init__.py", line 451, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/mona/mesh-fusion/librender/pyrender.so: cannot open shared object file: No such file or directory

关于我的系统:

$ lsb_release -a
LSB Version:    core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:   focal
$ python
Python 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on Linux

(tsdf) mona@goku:~/mesh-fusion$ pip freeze
cyfusion==0.0.0
Cython==0.29.21
decorator==4.4.2
freetype-py==2.2.0
h5py==3.1.0
imageio==2.9.0
networkx==2.5
numpy==1.19.5
Pillow==8.1.0
pkg-resources==0.0.0
pyglet==1.5.14
PyOpenGL==3.1.0
pyrender==0.1.43
scipy==1.6.0
six==1.15.0
trimesh==3.9.3

Tags: pipinpynonepy3anyusingfusion