【问题标题】:Try to install pymodbus3 but can't find Python 3.0 or later尝试安装 pymodbus3 但找不到 Python 3.0 或更高版本
【发布时间】:2017-05-20 23:07:40
【问题描述】:

我已经安装了 Python 2.7、3.5.2 和 3.6。我尝试为 Python 3.5.2 安装 pymodbus3。当我跑步时

pip install -U pymodbus3 --trusted-host pypi.python.org

我得到错误:

 Collecting pymodbus3
 Downloading pymodbus3-1.0.0.tar.gz (80kB)
 100% |################################| 81kB 6.8MB/s
 Complete output from command python setup.py egg_info:
 You need python 3.0 or later to run this script!

我还在 Python 路径中添加了 Python 3.5.2。 分析我的问题的下一步是什么?

编辑:

pip --version

给我

pip 9.0.1 from C:\Python27\Lib\site-packages (python 2.7)

所以我假设我必须为 python3 使用 pip?

【问题讨论】:

    标签: python python-3.x pip pymodbus3


    【解决方案1】:

    使用pip3:

    pip3 install -U pymodbus3 --trusted-host pypi.python.org
    

    pip 用于 Python 2,pip3 用于 Python 3。

    你可以找到pip所在的位置。

    在 Windows 上:

    where pip
    

    where pip3
    

    在 Unix/Mac 上:

    which pip
    

    或:

    which pip3
    

    参数-a 显示所有实例。您可以明确选择一个:

    /path/to/my/pip/pip3
    

    在 Windows 上,路径可能未设置。

    where python
    

    应该给你 Python 可执行文件。

    在同一目录中应该有一个包含pip3 的子目录Scripts。 将此添加到您的PATH

    你可以先试试绝对路径:

    C:\path\to\python\Scripts\pip3
    

    【讨论】:

    猜你喜欢
    • 2023-01-13
    • 1970-01-01
    • 2022-12-03
    • 1970-01-01
    • 2021-11-11
    • 1970-01-01
    • 1970-01-01
    • 2016-03-28
    • 1970-01-01
    相关资源
    最近更新 更多