2012-03-01 9 views
14

私はvirtualenvのとvirtualenvwrapperがインストールされていますが、セットアップにアプリケーションをしようとしたとき、私は次のエラーを取得mkvirtualenv --no-site-packages次のように入力しますmkvirtualenv --no-サイトパッケージは、「コマンドが見つかりません」の取得コマンドエラー

-bash: mkvirtualenv: command not found

このトラブルシューティングの方法がわかりません。初心者として、私はどんな助けにも感謝します。

答えて

26

virtualenvwrapperits docsに記載されているように有効にする必要があります。

Shell Startup File

Add three lines to your shell startup file (.bashrc , .profile , etc.) to set the location where the virtual environments should live, the location of your development project directories, and the location of the script installed with this package:

export WORKON_HOME=$HOME/.virtualenvs 
export PROJECT_HOME=$HOME/Devel 
source /usr/local/bin/virtualenvwrapper.sh 

After editing it, reload the startup file (e.g., run source ~/.bashrc).

3

これは実際にあなたがそれをインストールする方法に応じて少し異なります。 aptを使ってUbuntuにインストールした場合、virtualenvwrapper関数は実際にはbash補完ファイルにロールアウトされます(これは楽しいことです)!

export WORKON_HOME=$HOME/.virtualenvs 
export PROJECT_HOME=$HOME/Devel 
possible_scripts='/usr/local/bin/virtualenvwrapper.sh /etc/bash_completion.d/virtualenvwrapper' 
for script in $possible_scripts; do 
    [[ -f $script ]] && source $script 
done 
関連する問題