pipenv问题,使MarkupSafe自动作为依赖项安装

问题描述

我正在使用@arocks DjangoPatternsBook和代码

我有本书,并且想跟着代码一起学习,但是我认为我发现了一个错误,因为它在使用不同python环境的两台不同计算机上的起始行上对我来说是失败的,所以我认为这不是造成问题的环境。

在书籍部分开始项目

首先,从GitHub克隆示例项目:

$ git clone https://github.com/DjangoPatternsBook/superbook2.git

接下来,在全系统范围内安装pipenv [这是我的工作,在MacOS上使用brew,在Fedora 32上使用dnf]或在本地安装,但是在{{1} }安装文件。或者,请遵循以下命令[我没有这样做]:

virtualenv

现在转到项目目录并安装依赖项:

pipenv

这对我来说失败了,并显示以下消息:

   $ pip install -U pip
   $ pip install pipenv

因此,在新安装的Fedora 32机器上,我只做过:

   $ cd superbook2
   $ pipenv install --dev

而且我认为相同(或相似)的命令序列在其他python环境中也会类似地失败。

有人对如何解决此问题以及推进本书中的代码示例有任何建议吗?尽管我怀疑问题出在superbook2代码库之外,但是我已经在超级书2的github存储库中发布了new issue,因为我看到other similar issues与superbook2无关。

如果有帮助,我很乐意发布[pipenv.exceptions.InstallError]: ['Looking in indexes: https://pypi.python.org/simple','Collecting markupsafe==1.0',' Using cached MarkupSafe-1.0.tar.gz (14 kB)'] [pipenv.exceptions.InstallError]: ['ERROR: Command errored out with exit status 1:',' command: /home/alpha/.local/share/virtualenvs/superbook2-HNnQDu9M/bin/python3 -c \'import sys,setuptools,tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-5kl59pd3/markupsafe/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-5kl59pd3/markupsafe/setup.py\'"\'"\';f=getattr(tokenize,\'"\'"\'open\'"\'"\',open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\',\'"\'"\'\\n\'"\'"\');f.close();exec(compile(code,__file__,\'"\'"\'exec\'"\'"\'))\' egg_info --egg-base /tmp/pip-pip-egg-info-bk6ldht4',' cwd: /tmp/pip-install-5kl59pd3/markupsafe/',' Complete output (5 lines):',' Traceback (most recent call last):',' File "<string>",line 1,in <module>',' File "/tmp/pip-install-5kl59pd3/markupsafe/setup.py",line 6,' from setuptools import setup,Extension,Feature'," ImportError: cannot import name 'Feature' from 'setuptools' (/home/alpha/.local/share/virtualenvs/superbook2-HNnQDu9M/lib/python3.8/site-packages/setuptools/__init__.py)",' ----------------------------------------','ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.'] ERROR: ERROR: Package installation Failed... 输出。这两个python环境使用的版本分别为3.8.3(Fedora)和3.8.5(MacOS)。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)