当前位置: 首页 > 图灵资讯 > 行业资讯> linux下安装python后不能运行怎么办

linux下安装python后不能运行怎么办

发布时间:2025-01-02 17:34:49

问题:

(推荐教程:Python入门教程)

安装python后运行出现“./python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory”问题。

解决方法:

1、打开/etc/ld.so.conf文件;

2、在最后附加一行libpython2.7.so.1.0所在的路径,我这里是/usr/local/lib。

3、保存后执行:

/sbin/ldconfig
/sbin/ldconfig-v

相关文章

python3兼容python2吗

python3兼容python2吗

2025-05-09
python3 whl怎么安装

python3 whl怎么安装

2025-05-09
python 字典怎么提取value

python 字典怎么提取value

2025-05-09
python 怎样计算字符串的长度

python 怎样计算字符串的长度

2025-05-09
python 怎么样反向输出字符串

python 怎么样反向输出字符串

2025-05-09
python 怎么判断字符串开头

python 怎么判断字符串开头

2025-05-09