在使用WSL2 2/Debian在flask-mongoengine计算机上安装Win10时会出现错误。能够在没有问题的情况下安装其他项目依赖项。
输入的命令是:python3 -m pip install flask-mongoengine,错误输出如下)
已经尝试使用sudo做类似的工作,但没有任何改进。
Collecting flask-mongoengine
Using cached flask-mongoengine-0.9.5.tar.gz (111 kB)
ERROR: Command errored out with exit status 1:
command: /mnt/d/dev/opalapi/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wl69gb5c/flask-mongoengine/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wl69gb5c/flask-mongoengine/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-ldtngp0q
cwd: /tmp/pip-install-wl69gb5c/flask-mongoengine/
Complete output (44 lines):
WARNING: The wheel package is not available.
ERROR: Command errored out with exit status 1:
command: /mnt/d/dev/opalapi/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-l5ep1tsz/rednose/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-l5ep1tsz/rednose/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-w93yg6mf
cwd: /tmp/pip-wheel-l5ep1tsz/rednose/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for rednose
ERROR: Failed to build one or more wheels
Traceback (most recent call last):
File "/mnt/d/dev/opalapi/venv/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/mnt/d/dev/opalapi/venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpleem7stb', '--quiet', 'rednose']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-wl69gb5c/flask-mongoengine/setup.py", line 36, in <module>
setup(
File "/mnt/d/dev/opalapi/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 143, in setup
_install_setup_requires(attrs)
File "/mnt/d/dev/opalapi/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 138, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/mnt/d/dev/opalapi/venv/lib/python3.8/site-packages/setuptools/dist.py", line 695, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/mnt/d/dev/opalapi/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 781, in resolve
dist = best[req.key] = env.best_match(
File "/mnt/d/dev/opalapi/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "/mnt/d/dev/opalapi/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1078, in obtain
return installer(requirement)
File "/mnt/d/dev/opalapi/venv/lib/python3.8/site-packages/setuptools/dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "/mnt/d/dev/opalapi/venv/lib/python3.8/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['/mnt/d/dev/opalapi/venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpleem7stb', '--quiet', 'rednose']' 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-07-17 02:42:29
发布于 2020-07-17 05:22:35
这显然是车轮问题,因为车轮没有安装在您的系统中。
was是一种比每次从源代码重新构建更快、更可靠的安装Python软件的方法。
使用此命令
pip install wheel flask-mongoengine如果您使用的是python3,而不是将它作为默认的python,那么请使用
pip3 install wheel flask-mongoenginehttps://stackoverflow.com/questions/62945858
复制相似问题