在Mac上与Pip一起安装后找不到命令

在Mac上与Pip一起安装后找不到命令

本文介绍了virtualenv:在Mac上与Pip一起安装后找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Mac上安装VirtualEnv.我已经用brew安装了Python和Pip.跑步后pip安装virtualenv当我尝试使用它时,我得到:

I am trying to install VirtualEnv on my Mac. I have installed Python and Pip with brew. After runningpip install virtualenvWhen I try to use it I am getting:

bash: "virtualenv: command not found"

我不确定virtualenv的安装位置.我的PATH环境变量包含:

I am unsure where virtualenv has been installed.My PATH environment variable contains:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/X11/bin

我正在使用:Mac Os 10.7.5

I am using: Mac Os 10.7.5

推荐答案

我遇到了类似的问题.

您需要做的是将软件包安装位置的路径名添加到您的.profile文件中.看一下virtualenv软件包的安装位置-在我的例子中是/Users/ianloke/Library/Python/2.7/bin.然后将此路径名附加到PATH环境变量中.

What you need to do is to add the pathname of where the package was installed to your .profile file. Look to see where the virtualenv package was installed into - in my case it was /Users/ianloke/Library/Python/2.7/bin. Then append this pathname to the PATH environment variable.

这篇关于virtualenv:在Mac上与Pip一起安装后找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 15:04