![](/img/trans.png)
[英]'pipenv' is not recognized as an internal or external command, operable program or batch file
[英]pipenv - 'pew' is not recognized as an internal or external command, operable program or batch file
为什么我不能进入pipenv shell
?
PS C:\Users\...\desktop\projects\myproject> pip freeze
backports.shutil-get-terminal-size==1.0.0
certifi==2018.1.18
chardet==3.0.4
configparser==3.5.0
Django==1.11
django-debug-toolbar==1.9.1
django-extensions==1.9.9
django-extra-views==0.9.0
djangorestframework==3.7.7
djaodjin-survey==0.1.7
enum34==1.1.6
flake8==3.5.0
idna==2.6
jsonfield==2.0.2
mccabe==0.6.1
pathlib==1.0.1
pew==1.1.2 <---------------------------------- it's right bloody here
pipenv==9.0.3
psutil==5.3.1
psycopg2==2.7.3.2
pycodestyle==2.3.1
pyflakes==1.6.0
pytz==2017.3
rebar==0.1
requests==2.18.4
shutilwhich==1.1.0
six==1.11.0
sqlparse==0.2.4
typing==3.6.2
urllib3==1.22
virtualenv==15.1.0
virtualenv-clone==0.2.6
因此肯定安装了pew
。
PS C:\Users\...\desktop\projects\myproject> pipenv shell
Creating a virtualenv for this project…
New python executable in C:\Users\...\.virtualenvs\myproject-bRnmVZJC\Scripts\python.exe
Installing setuptools, pip, wheel...done.
Virtualenv location:
'pew' is not recognized as an internal or external command,
operable program or batch file.
但是以某种方式,当我进入pipenv shell
(不是这样,我可以安装未使用pipenv
安装的软件包)
问题是我已经使用Python 2.7安装了pipenv
要修复,我同时安装了python 2.7和3.4并设置了两者的路径,以便python2
运行2.7和python3
运行3.4。
然后,我使用python3安装了pipenv
,并启动了在python 2.7中运行的pipenv
。
python3 -m pip install --user pipenv
cd C:\Users\...\desktop\projects\myproject>
然后将用户库的二进制目录设置为PATH并添加
C:\Users\Username\AppData\Roaming\Python36\Scripts
到我的路径,然后
pipenv --two install
pipenv shell
和瞧!
Launching subshell in virtual environment. Type 'exit' to return.
Microsoft Windows [Version 10.0.16299.192]
(c) 2017 Microsoft Corporation. All rights reserved.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.