簡體   English   中英

-bash:doc2dash:在OS X Mavericks中找不到命令

[英]-bash: doc2dash: command not found in OS X Mavericks

我有兩天大的Mac Pro,帶有OS X Mavericks,需要使doc2dash正常工作。

我已經安裝了Python,pip和doc2dash,但是在終端機中鍵入“ doc2dash”時,仍然出現以下錯誤。

-bash: doc2dash: command not found

這是我的.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.

根據評論進行編輯:

哪個doc2dash

不返回任何內容。

當我運行“ 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... 

當我在上面的目錄中列出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不在/ usr / local / bin中。

有人可以告訴我怎么做才能使此命令生效嗎?

pip install --user將命令安裝到~/Library/Python/2.7/bin 更新您的.bash_profile以包含以下行:

export PATH="$HOME/Library/Python/2.7/bin:/usr/local/bin:$PATH"

然后打開一個新的終端,外殼將能夠找到doc2dash

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM