更新时间:2021-12-13 07:56:13
尝试将 python3.4 的 lib 路径添加到 $LD_LIBRARY_PATH
环境变量中.
Try adding the python3.4's lib path to the $LD_LIBRARY_PATH
environment variable.
首先找出python3.4的lib路径(取决于你是如何安装python3.4的)
First find out the lib path of python3.4 (depends on how you installed python3.4)
对我来说是:/opt/python361/lib
,然后将其添加到环境变量中,如下所示:
For me it was: /opt/python361/lib
, then add it to environment variable like so:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python361/lib
附言我在使用 virtualenv
和 python3.6
时遇到了类似的问题,我像这样修复了它:
P.S.
I came across a similar problem while using virtualenv
with python3.6
, and I fixed it like so:
include
附加到 /etc/ld.so.conf
(类似于:include/opt/python361/lib
或 include/usr/local/lib
)sudo/sbin/ldconfig -v
来激活新配置.include <lib path of python3.x>
to /etc/ld.so.conf
(Something like: include /opt/python361/lib
or include /usr/local/lib
)sudo /sbin/ldconfig -v
.