python - 为什么我不能在 python 中创建一个轮子?

标签 python pip setuptools python-wheel

这是我正在运行的命令:

$ python setup.py bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_wheel'

$ pip --version
pip 1.5.6 from /usr/local/lib/python3.4/site-packages (python 3.4)

$ python -c "import setuptools; print(setuptools.__version__)"
2.1

$ python --version
Python 3.4.1

$ which python
/usr/local/bin/python

另外,我正在使用自制 python 运行 mac

这是我的 setup.py 脚本: https://gist.github.com/cloudformdesign/4791c46fe7cd52eb61cd

我快疯了——我不明白为什么这不起作用。

最佳答案

安装wheel package第一:

pip install wheel

文档对此并不太清楚,但“wheel 项目为 setuptools 提供 bdist_wheel 命令” 实际上意味着 “wheel .. .".

关于python - 为什么我不能在 python 中创建一个轮子?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26664102/

相关文章:

python 值分配错误(08、09 有什么问题)

python - (ArcGIS) 为 Arcpy 创建新函数

python - Graphite 作为 Django Web 应用程序为所有静态资源返回 404

python - 卸载安装有 `pip install .` 的包

python - setup.py 中的替代依赖项(回退)

python - 使用 setuptools 从位置安装

python - Python Pandas 中按对象分组的时差

python - SpaCy 安装(扩展)因 pip install 失败

python - 由于 setup.py egg_info 文件无法安装 pysal

带有参数的python设置工具console_scripts