小编kbu*_*lds的帖子

Python 3 `venv` 和 `wheel` 包

从python3.8开始,我注意到该wheel包似乎需要pip install无错误地打包(至少它们看起来像错误,但行为却像警告)。

注意:在我的所有示例中,我通过停用环境、删除环境并清除 pip 缓存来进行清理:

deactivate
rm test_env/ -rf
rm ~/.cache/pip/ -rf
Run Code Online (Sandbox Code Playgroud)

示例 1:问题

python3.8 -m venv test_env
source test_env/bin/activate
pip install markuppy
Run Code Online (Sandbox Code Playgroud)

我得到以下输出:

Collecting markuppy
  Downloading MarkupPy-1.14.tar.gz (6.8 kB)
Building wheels for collected packages: markuppy
  Building wheel for markuppy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/k/test_env/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tfm9bgxv/markuppy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tfm9bgxv/markuppy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-cpx9gxcn
       cwd: /tmp/pip-install-tfm9bgxv/markuppy/
  Complete output (6 …
Run Code Online (Sandbox Code Playgroud)

python linux pip ubuntu-20.04

23
推荐指数
1
解决办法
5608
查看次数

标签 统计

linux ×1

pip ×1

python ×1

ubuntu-20.04 ×1