python setup.py install可以使用轮子吗? [英] Can python setup.py install use wheels?
问题描述
我正在使用setuptools.有没有一种方法可以让以下命令使用转轮而不是源代码?
I am using setuptools. Is there a way to have the following command use wheels instead of source?
python setup.py install
特别是,我有一个需要熊猫的自定义程序包.虽然panda可以通过pip很好地安装(因为它抓住了轮子),但是运行python setup.py时,pandas不会安装(由于pandas缺少对我机器的依赖)
In particular, I have a custom package that requires pandas. While pandas installs perfectly fine with pip (because it grabs the wheel), pandas won't install while running python setup.py (due to pandas having missing dependencies on my machine)
或者,其他人如何将熊猫作为项目中的依赖项?我必须在我的setup.py文件中包括所有熊猫依赖项吗?
Or perhaps, how do other people handle pandas as a dependency in there projects? Must I include all of pandas dependencies in my setup.py file?
谢谢
推荐答案
一种解决方案是使用pip
安装项目. pip
能够正确处理您的setup.py
,并且默认情况下会使用滚轮.
One solution is to use pip
to install you project. pip
is able to handle your setup.py
correctly and will use wheels by default if available.
因此您可以尝试替换:
python setup.py install
通过pip install .
应该可以.
这篇关于python setup.py install可以使用轮子吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!