简体   繁体   English

virtualenvwrapper无法正确安装?

[英]virtualenvwrapper not installing correctly?

I am trying to use a Python virtual environment for the first time while trying to learn Django. 在尝试学习Django时,我第一次尝试使用Python虚拟环境。 I am using the instructions here . 我在这里使用说明。 As I am using git bash on Windows, I am following the setup instructions for Windows. 当我在Windows上使用git bash时,我正在遵循Windows的安装说明。 I installed virtualenvwrapper using 我使用安装了virtualenvwrapper

pip3 install virtualenvwrapper-win

Now the command mkvirtualenv gets me bash: mkvirtualenv: command not found 现在,命令mkvirtualenv让我bash: mkvirtualenv: command not found

I tried the solutions here to no avail. 我在这里尝试解决方案无济于事。

pip3 list shows that the package is, in fact, installed, but there is no virtualenvwrapper (or virtualenv) .sh files in the site-packages directory, and the only related file I can find is virtualenvwrapper_win-1.2.5-py3.6.egg-info in an AppData/Roaming directory. pip3 list显示实际上已经安装了该软件包,但是site-packages目录中没有virtualenvwrapper(或virtualenv).sh文件,我可以找到的唯一相关文件是virtualenvwrapper_win-1.2.5-py3.6.egg-info AppData / Roaming目录中的virtualenvwrapper_win-1.2.5-py3.6.egg-info

Any suggestions? 有什么建议么? Thanks. 谢谢。

I had the same problem and tried uninstalling virtualenvwrapper-win , just to see the list of files that would be removed. 我遇到了同样的问题,并尝试卸载virtualenvwrapper-win ,只是为了查看将要删除的文件列表。 I saw that the mkvirtualenv was located in C:\\Python\\Python37\\Scripts . 我看到mkvirtualenv位于C:\\Python\\Python37\\Scripts

I noticed I was using the 64bit version of python ( C:\\Python\\Python37\\ ) alongside the 32bit one ( C:\\Python\\Python37-32\\ ), both folders being in the PATH of my system's properties. 我注意到我正在使用64位版本的python( C:\\Python\\Python37\\ )和32位版本的( C:\\Python\\Python37-32\\ ),这两个文件夹都位于系统属性的PATH中。 I removed the 32bit version's directories from the PATH and this seemed to work. 我从PATH删除了32位版本的目录,这似乎可行。

PS: I also noticed that running the commands from the MINGW terminal requires them to also have the .bat extension added: PS:我还注意到从MINGW终端运行命令还要求它们还添加.bat扩展名:

在此处输入图片说明

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

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