简体   繁体   English

有问题 virtualenv 无法创建 virtualenv

[英]having problem virtualenv cannot create virtualenv

Microsoft Windows [Version 10.0.22509.1000]
(c) Microsoft Corporation. All rights reserved.

C:\WINDOWS\System32>cd C:\Users\adity\OneDrive\Desktop\GFG

C:\Users\adity\OneDrive\Desktop\GFG>pip install virtualenv
Requirement already satisfied: virtualenv in c:\users\adity\appdata\roaming\python\python310\site-packages (20.13.0)
Requirement already satisfied: six<2,>=1.9.0 in c:\users\adity\appdata\roaming\python\python310\site-packages (from virtualenv) (1.16.0)
Requirement already satisfied: distlib<1,>=0.3.1 in c:\users\adity\appdata\roaming\python\python310\site-packages (from virtualenv) (0.3.4)
Requirement already satisfied: filelock<4,>=3.2 in c:\users\adity\appdata\roaming\python\python310\site-packages (from virtualenv) (3.4.2)
Requirement already satisfied: platformdirs<3,>=2 in c:\users\adity\appdata\roaming\python\python310\site-packages (from virtualenv) (2.4.1)

C:\Users\adity\OneDrive\Desktop\GFG>virtualenv venv
'virtualenv' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\adity\OneDrive\Desktop\GFG>
  1. If Scripts is already in path variable then check if you have virtualenv.exe in that folder is it is not thee then remove virtualenv and add it again.如果 Scripts 已经在路径变量中,则检查该文件夹中是否有 virtualenv.exe 是否不是您,然后删除 virtualenv 并再次添加。 Just like @saeed-emamyari suggested.就像@saeed-emamyari 建议的那样。
pip uninstall virtualenv 
pip install virtualenv
  1. virtualenv.exe is in pyhton scripts folder and this folder must be in your PATH environment variable. virtualenv.exe 位于 pyhton 脚本文件夹中,该文件夹必须位于您的 PATH 环境变量中。 Add the python script folder path to your path variable.将 python 脚本文件夹路径添加到您的路径变量。 Location should be C:\Users\adity\AppData\Local\Programs\Python\Python38\Scripts .位置应该是C:\Users\adity\AppData\Local\Programs\Python\Python38\Scripts You need to open a new cmd to test because environment variable do not get reload after cmd is opened.您需要打开一个新的 cmd 进行测试,因为在打开 cmd 后环境变量不会重新加载。 (No idea why microsoft won't just make an event listener/handler for this) (不知道为什么微软不会为此创建一个事件侦听器/处理程序)

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

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