【问题标题】:Setuptools Wheels Twine Package Install ErrorSetuptools Wheels Twine Package 安装错误
【发布时间】:2019-07-19 06:45:33
【问题描述】:

我正在尝试安装包 Setuptools Wheels Twine 以在 Pypi 中发布我的包,但是在安装安装包时出现此错误。 我使用 Windows 10 作为我的操作系统和 VS 代码。

    C:\Users\Farhan Hasant\moshpdf>pip install setuptools wheels twinese
Collecting setuptools
  Using cached https://files.pythonhosted.org/packages/d1/6a/4b2fcefd2ea0868810e92d519dacac1ddc64a2e53ba9e3422c3b62b378a6/setuptools-40.8.0-py2.py3-none-any.whl
Collecting wheels
  Could not find a version that satisfies the requirement wheels (from versions: )
No matching distribution found for wheels

【问题讨论】:

    标签: python setuptools pypi


    【解决方案1】:

    正确的代码是:

    pip install setuptools wheel twine
    

    【讨论】:

      【解决方案2】:

      您无需安装轮子即可将包分发到 PyPI。 你必须给出以下命令-

      python setup.py bdist_wheel
      python setup.py sdist
      twine upload dist/*
      

      第一个命令将创建一个 .whl 包。第二个命令将创建一个 .tar.gz 包(支持旧版本 Python 的一个好习惯),第三个命令是将你的模块上传到 PyPI 的 twine 命令

      【讨论】:

      • 不安装如何运行bdist_wheeltwine
      • 是的,你必须安装 twine,但我不确定我们是否需要安装 bdist_wheel,也许它包含在 python 中。
      猜你喜欢
      • 1970-01-01
      • 2011-12-16
      • 2010-12-16
      • 2021-07-13
      • 2016-03-19
      • 2016-03-27
      • 2013-02-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多