python setup.py install可以使用轮子吗? [英] Can python setup.py install use wheels?

查看:77
本文介绍了python setup.py install可以使用轮子吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆