Python设置:找不到命令 [英] Python setup : command not found
问题描述
抱歉,如果这是一个基本问题:
Apologies if this is a basic question:
我一直在尝试按照这里的教程在我的笔记本电脑上设置 Python一>.在 PIP, VIRTUALENV + VIRTUALENVWRAPPER 副标题下,它说
I have been trying to setup Python on my laptop by following the tutorial here. Under PIP, VIRTUALENV + VIRTUALENVWRAPPER subtitle, it says
现在设置 virtualenvwrapper:
And now setup virtualenvwrapper:
1 $ export WORKON_HOME=$HOME/.virtualenvs
2 $ export MSYS_HOME=/c/msys/1.0
3 $ source /usr/local/bin/virtualenvwrapper.sh
上面的最后一行给了我以下错误:
The last line of above gives me the following error:
$ source /usr/local/bin/virtualenvwrapper.sh
sh.exe": /usr/local/bin/virtualenvwrapper.sh: No such file or directory
所以当我测试我的设置时,我收到以下错误:
So when I test my setup I get the following error:
$ mkvirtualenv TestEnv
sh.exe": mkvirtualenv: command not found
有人可以帮我吗?
这一切都在 Win7 笔记本电脑上.
THis is all on a Win7 laptop.
谢谢.
推荐答案
从你写的内容来看,我认为你正在混合 Windows 和 Linux shell 命令.
From what you wrote it looks to me that you are mixing Windows and Linux shell commands.
我强烈建议您在使用包装器之前先让 virtualenv 工作
I strongly advocate you get the virtualenv working first before you turn to a wrapper
在 Windows 7 上获取 virtualenv
To get virtualenv on Windows 7
pip install virtualenv
然后
virtualenv name_to_your_env
name_to_your_env\Scripts\activate
这篇关于Python设置:找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!