[英]-bash: doc2dash: command not found in OS X Mavericks
I have a two day old Mac Pro with OS X Mavericks and need to get doc2dash working. 我有两天大的Mac Pro,带有OS X Mavericks,需要使doc2dash正常工作。
I've installed Python, pip and doc2dash, but I keep getting the following error when typing "doc2dash" in Terminal. 我已经安装了Python,pip和doc2dash,但是在终端机中键入“ doc2dash”时,仍然出现以下错误。
-bash: doc2dash: command not found
Here is what my .bash_profile
file looks like: 这是我的.bash_profile
文件的样子:
# Set architecture flags
export ARCHFLAGS="-arch x86_64"
# Ensure user-installed binaries take precedence
export PATH=/usr/local/bin:$PATH
# Load .bashrc if it exists
test -f ~/.bashrc && source ~/.bashrc
#[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
##
# Your previous /Users/USERNAME/.bash_profile file was backed up as /Users/USERNAME/.bash_profile.macports-saved_2014-03-08_at_02:37:54
##
# MacPorts Installer addition on 2014-03-08_at_02:37:54: adding an appropriate PATH variable for use with MacPorts.
#export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
Edited based on comments: 根据评论进行编辑:
which doc2dash 哪个doc2dash
Returns nothing. 不返回任何内容。
When I run 'sudo pip install --user doc2dash', the following appears: 当我运行“ sudo pip install --user doc2dash”时,出现以下内容:
Requirement already satisfied (use --upgrade to upgrade): doc2dash in /Users/USERNAME/Library/Python/2.7/lib/python/site-packages Cleaning up...
When I list the doc2dash files in the directory above, this is what appears: 当我在上面的目录中列出doc2dash文件时,将显示以下内容:
drwxr-xr-x 9 USERNAME staff 306 Mar 8 02:28 doc2dash
drwxr-xr-x 9 USERNAME staff 306 Mar 8 02:28 doc2dash-1.2.0.dist-info
doc2dash does not reside in /usr/local/bin. doc2dash不在/ usr / local / bin中。
Can someone please tell me what to do in order to get this command to work? 有人可以告诉我怎么做才能使此命令生效吗?
pip install --user
installs commands to ~/Library/Python/2.7/bin
. pip install --user
将命令安装到~/Library/Python/2.7/bin
。 Update your .bash_profile
to include the line: 更新您的.bash_profile
以包含以下行:
export PATH="$HOME/Library/Python/2.7/bin:/usr/local/bin:$PATH"
Then open a new terminal and the shell will be able to find doc2dash
. 然后打开一个新的终端,外壳将能够找到doc2dash
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.