如何将pillow导入到cpanel django项目中

问题描述 投票:0回答:1

我想更新我的使用 django 制作的网站,我想添加一个由 django 管理员管理的在线商店部分,但是当我想做 makemigrations 时,它告诉我不能使用 imageFields,因为它没有在项目中安装Pillow,但它不允许我安装Pillow,我尝试了其他版本,在requirements.txt中以多种方式,但没有办法让我将Pillow添加到django应用程序。 一件非常重要的事情是我在 cpanel 中没有终端,我不能拥有它,他们只让我添加脚本和 pip 安装,如下图所示: Here you can see what the format is like to add scripts or pip install

当我想使用 pip install 安装时,requirements.txt 告诉我:

运行 setup.py(路径:/tmp/pip-build-32phlj94/Pillow/setup.py)egg_info 包 Pillow 生成项目名称未知的元数据。修复你的#egg=枕头碎片。未知的构建轮失败未知命令的构建轮失败“/home2/cannareiscom/virtualenv/CANNAb/3.9/bin/python3.9_bin -u -c”导入setuptools,tokenize;file='/tmp/pip-build-32phlj94 /Pillow/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace(' ',' ');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-i_xg6rjm-record/install-record.txt --single-version-externally -management --compile --install-headers /home2/cannareiscom/virtualenv/CANNAb/3.9/include/site/python3.9/unknown" 失败,错误代码 1 在 /tmp/pip-build-32phlj94/Pillow/You are使用 pip 版本 9.0.1,但是版本 23.3.1 可用。您应该考虑通过“pip install --upgrade pip”命令进行升级。

当我使用pip install运行requirements.txt时出现该错误,在requirements.txt中只有Pillow==10.1.0,也尝试使用小写P,也尝试使用其他版本,例如7.2.0,还有更多...它不可能让我安装枕头,如果你能帮助我那就太好了。

python django pip python-imaging-library cpanel
1个回答
0
投票

试试这个

pip install Pillow==8.3.2

© www.soinside.com 2019 - 2024. All rights reserved.