安装django-test-plus失败

来源:5-7 为模型类-网址-视图编写测试用例

華晧

2020-09-16

图片描述
图片描述

写回答

2回答

Jack

2020-09-17

您好,截图的下面还有错误信息吗

1
1
華晧
File "/root/.local/share/virtualenvs/zanhu-xhAJ2tUW/lib/python3.7/site-packages/setuptools/dist.py", line 758, in fetch_build_egg return fetch_build_egg(self, req) File "/root/.local/share/virtualenvs/zanhu-xhAJ2tUW/lib/python3.7/site-packages/setuptools/installer.py", line 130, in fetch_build_egg raise DistutilsError(str(e)) from e distutils.errors.DistutilsError: Command '['/root/.local/share/virtualenvs/zanhu-xhAJ2tUW/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpc10ha5bb', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'pytest-django']' returned non-zero exit status 1. ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
2020-09-17
共1条回复

Jack

2020-09-17

更新一下pip和setuptools试试

sudo pip install --upgrade pip

sudo pip install -U setuptools

0
2
華晧
解决了,估计是依赖的问题。我把源码里的setup.py里的tests_require=[ "pytest<6.0", "pytest-django==3.9.0", "pytest-cov==2.8.1", "pytest-pythonpath==0.7.3", "factory-boy>=2.11.1", ], 手动安装后再安装django-test-plus就没有报错了
2020-09-18
共2条回复

Django高级实战 开发企业级问答网站

融合Django高级用法/算法/设计模式/TestCase测试/云计算打造项目

900 学习 · 756 问题

查看课程