【问题标题】:Python-3.8.3 not installing in Oracle Linux Server 7.3?Python-3.8.3 未安装在 Oracle Linux Server 7.3 中?
【发布时间】:2021-04-26 16:48:16
【问题描述】:

wgethttps://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz

解压Python-3.8.3.tgz,解压后文件夹没有bin文件夹

已从工作的 Oracle Linux Server 7.6 服务器复制解压缩的 Python3.8.3 并运行 python3 或 python8.3 但说找不到命令

【问题讨论】:

    标签: linux python-3.8 oraclelinux


    【解决方案1】:

    不确定你把解压后的 python 目录放在哪里, 但除非您添加该目录在您的路径中,否则您需要从当前目录运行它

    ./python3
    # or
    ./python3.8
    

    或者将解压后的目录添加到路径中。

    # for current session only
    export PATH=$PATH:/your/unzipped/python/dir
    # to add permanently
    echo 'export PATH=$PATH:/your/unzipped/python/dir' >> ~/.bashrc
    # or ~/.bash_profile
    

    【讨论】:

    • 我直接在 bin 文件夹内运行
    • 但这是python bin,这个目录在你的路径中吗?
    • 为什么不使用yum install -y python3?
    • 感谢添加 bin 到路径工作!!。如果我们导航 bin 目录而不添加到 PATH 它不起作用..bash 永远不会在当前目录中搜索命令?
    • 对,但是您可以添加./ 这意味着即使应用程序不在路径中,也可以从当前目录运行。
    猜你喜欢
    • 2021-02-10
    • 1970-01-01
    • 2016-02-21
    • 2021-10-27
    • 2020-12-23
    • 2020-09-10
    • 2013-10-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多