Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 为什么setuptools这么慢_Python_Python 3.x_Setuptools - Fatal编程技术网

Python 为什么setuptools这么慢

Python 为什么setuptools这么慢,python,python-3.x,setuptools,Python,Python 3.x,Setuptools,我有一个单python库,但它的内存是40MB。但是,制作轮锉需要12个多小时 我的电脑配置: 我有一个像样的3.4 GHZ 16核处理器,具有3个缓存层和64 GB RAM和SSD。 setuptools在这里卡住了: copying server\views\generic\edit.py -> build\lib\server\views\generic copying server\views\generic\list.py -> build\lib\server\views

我有一个单python库,但它的内存是40MB。但是,制作轮锉需要12个多小时

我的电脑配置: 我有一个像样的3.4 GHZ 16核处理器,具有3个缓存层和64 GB RAM和SSD。

setuptools在这里卡住了:

copying server\views\generic\edit.py -> build\lib\server\views\generic
copying server\views\generic\list.py -> build\lib\server\views\generic
copying server\views\generic\__init__.py -> build\lib\server\views\generic
creating build\lib\server\views\templates
copying server\views\templates\__init__.py -> build\lib\server\views\templates
在这里,它被卡住了大部分时间,但它仍然使用我的处理器


我只是好奇为什么要花这么长的时间才能将轮子文件发布到pypi上。

python只使用1个核心,除非您使用threads或concurrent.futures.ProcessPoolExecutor类,所以对于setuptools来说,您是否有1个或16个核心并不重要,因为它只使用1个核心(至少据我所知,setuptools不使用线程,也不使用将任务拆分到多个核心上的线程)

编辑:

了解使用哪个版本的setuptools后,请在终端中使用以下命令升级setuptools:
python-m pip install-U setuptools
将setuptools升级到最新版本,由于存在错误,这将使升级速度大大加快
这一点现在已经解决了,但当时已经存在。

我们无法诊断您的大构建为何需要如此长的时间,因为我们可以访问0%的代码和构建配置。这不是代码,我使用的构建配置是:
python setup.py sdist bdist_wheel
您链接的(然后删除链接到)中的setup.pyGithub存储库似乎缺少您自己机器上的组件(比如
data\u types.txt
是什么),而且还不清楚Github上的内容是否与您本地的内容匹配。我倾向于认为您的问题是由于安装脚本中的错误造成的。@lua您使用的是什么版本的安装工具?@Matthijs990我使用39.1.01 core或16,12小时的构建远远超出了标准。我知道我现在并不是说这是他问题的解决方案我的问题解决了,谢谢。现在只花了40/50分钟。