gpt4 book ai didi

python - 警告 : '' not a valid package name; please use only. -setup.py 中的分隔包名称

转载 作者:太空宇宙 更新时间:2023-11-04 01:29:14 24 4
gpt4 key购买 nike

我遇到了一个 github 项目,我正在尝试安装并运行它,但遇到了一些问题 (https://github.com/andrewschoen/django-cms-demo)。我也把它作为一个问题提出来了 https://github.com/andrewschoen/django-cms-demo/issues/2 .

问题似乎与安装 PIL 有关,如果我理解正确的话:

Running setup.py egg_info for package PIL
WARNING: '' not a valid package name; please use only.-separated package na
es in setup.py

我尝试通过将 requirements.txt 中的行更改为:Pillow==1.7.8 来“加入”Pillow

$ pip install -r requirements.txt

............
copying PIL\XVThumbImagePlugin.py -> build\lib.win32-2.7\PIL

running build_ext

building '_imaging' extension

f:\python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
'use_2to3'

warnings.warn(msg)

error: Unable to find vcvarsall.bat

----------------------------------------
Command f:\django-cms-demo\env\Scripts\python.exe -c "import setuptools;__file__
='f:\\django-cms-demo\\env\\build\\Pillow\\setup.py';exec(compile(open(__file__)
.read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\dni
r\appdata\local\temp\pip-cjnff6-record\install-record.txt --single-version-exter
nally-managed --install-headers f:\django-cms-demo\env\include\site\python2.7 fa
iled with error code 1 in f:\django-cms-demo\env\build\Pillow
Storing complete log in m:/pip\pip.log

我刚开始使用 python 和 django,来自 php。我正在尝试在 USB 驱动器上设置此项目,并且我正在使用 win7。

提前感谢您的想法,

比尔

最佳答案

PIL 未正确打包;有一些解决这个问题的分支。

来自 The problem with installing PIL using virtualenv or buildout , 你目前最好的选择是安装 Pillow反而;它是 PIL 的直接替代品。

对于 Windows,使用 precompiled installer from Christoph Gohlke相反。

关于python - 警告 : '' not a valid package name; please use only. -setup.py 中的分隔包名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15142272/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com