无法使用pipenv创建虚拟环境

问题描述 投票:0回答:2

我正在尝试使用pipenv命令使用Python 3.7创建虚拟环境。尝试运行pipenv install --python=python3.7会出现以下错误:

pipenv install --python=python3.7 

loading virtual environment veriables

Creating a virtual environment for this project

Using path/to/python3.7 (3.7.0) to create virtualenv...

Creating virtual environment... Already using interpreter path/to/python3.7


New python executable in /home/user/.local/share/myproject/bin/python3.7

Not overwriting existing python script /home/user/.local/share/myproject/bin/python (you must use /home/user/.local/share/myproject/bin/python3.7)

failed to create a virtual environment.

如何使用pipenv创建虚拟环境?

python python-3.x virtualenv
2个回答
0
投票

有几种方法可以创建虚拟环境,请尝试使用这些命令

sudo pip3 install virtualenv 
# After this installation 
python -m virtualenv vnvname
or
python3 -m virtualenv vnvname

It will create a virtual environment


0
投票

您可以使用virtualenv命令

virtualenv -p python3 envname

更新:

pip install --upgrade virtualenv
© www.soinside.com 2019 - 2024. All rights reserved.