简体   繁体   English

使用 venv 制作虚拟环境挂起

[英]Making virtual environment with venv hangs

When I'm trying to make a virtual environment using python3 -m venv venv , the process hangs.当我尝试使用python3 -m venv venv创建虚拟环境时,进程挂起。 I then ran with verbose by running python3 -v -m venv venv and the last few lines are然后我通过运行python3 -v -m venv venv详细运行,最后几行是

# /Users/me/.pyenv/versions/3.6.2/lib/python3.6/__pycache__/struct.cpython-36.pyc matches /Users/me/.pyenv/versions/3.6.2/lib/python3.6/struct.py
# code object from '/Users/me/.pyenv/versions/3.6.2/lib/python3.6/__pycache__/struct.cpython-36.pyc'
# extension module '_struct' loaded from '/Users/me/.pyenv/versions/3.6.2/lib/python3.6/lib-dynload/_struct.cpython-36m-darwin.so'
# extension module '_struct' executed from '/Users/me/.pyenv/versions/3.6.2/lib/python3.6/lib-dynload/_struct.cpython-36m-darwin.so'
import '_struct' # <_frozen_importlib_external.ExtensionFileLoader object at 0x10cdf6d68>
import 'struct' # <_frozen_importlib_external.SourceFileLoader object at 0x10cdf6be0>
import 'gettext' # <_frozen_importlib_external.SourceFileLoader object at 0x10cdc5898>
import 'argparse' # <_frozen_importlib_external.SourceFileLoader object at 0x10ccd08d0>

What might be causing this to hang after this?什么可能导致此后挂起? I cannot find the script for venv to see what should happen next.我找不到venv的脚本来查看接下来会发生什么。

You've answered the question during the question.您已在提问过程中回答了问题。

I'm assuming running it without sudo causes a process to hang as a specific process may need sudo privileges to run我假设在没有 sudo 的情况下运行它会导致进程挂起,因为特定进程可能需要 sudo 权限才能运行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM