首页 > 解决方案 > 无法在opensuse linux中安装python3

问题描述

在我的 linux 终端中安装后键入 python3 时,我遇到以下错误:- 请帮我解决这个问题。我是否需要设置任何环境变量,如 python home 或 python 路径。如果是这样,我将其设置为。

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python 3.6.8 (default, Jun 26 2021, 16:14:26)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "/etc/pythonstart", line 7, in <module>
    import readline
ModuleNotFoundError: No module named 'readline'

以下是 whereis python3 的结果

 python3: /usr/bin/python3 /usr/bin/python3.6 /usr/bin/python3.6m /usr/lib/python3.6 /usr/lib64/python3.6 /usr/local/bin/python3 /usr/local/bin/python3.6-config /usr/local/bin/python3.6m /usr/local/bin/python3.6 /usr/local/bin/python3.6m-config /usr/local/lib/python3.6 /opt/Python-3.6.8/bin/python3 /opt/Python-3.6.8/bin/python3.6 /opt/Python-3.6.8/bin/python3.6m /usr/share/man/man1/python3.1.gz

标签: python-3.xlinuxinstallationopensuse

解决方案


推荐阅读