OSXシステムにPython 3.5をAnaconda経由でインストールしました。仮想環境のインストールと起動後、はvirtualenv用のPython 3.5インタプリタを読み込めません
virtualenv venv
source venv/bin/activate
PythonバージョンはPython 2.7.10です。 virtualenvに選択した通訳を読み込むことが許されている間、 "/ usr/bin /"にはPython 2.6と2.7のフォルダしかありません。アナコンダのpython 3.5経路(/Users/Username/anaconda/lib/python3.5) を発見し、それをロードしようとした後、
for: virtualenv -p /Users/Username/anaconda/lib/python3.5 venv
コードが
> Running virtualenv with interpreter /Users/Username/anaconda/lib/python3.5
> Traceback (most recent call last): File "/usr/local/bin/virtualenv",
> line 11, in <module>
> sys.exit(main()) File "/Library/Python/2.7/site-packages/virtualenv.py", line 790, in main
> popen = subprocess.Popen([interpreter, file] + sys.argv[1:], env=env) File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py",
> line 710, in __init__
> errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py",
> line 1335, in _execute_child
> raise child_exception
OSError: [Errno 13] Permission denied
を拒否[エラー番号13]権限を返しますエラーの別のタイプがあるように思わ
for: virtualenv -p /Users/Username/anaconda/bin/python3.5 venv
...
Running virtualenv with interpreter /Users/Username/anaconda/bin/python3.5
Using base prefix '/Users/Username/anaconda'
New python executable in venv/bin/python3.5
Not overwriting existing python script venv/bin/python (you must use venv/bin/python3.5)
ERROR: The executable venv/bin/python3.5 is not functioning
ERROR: It thinks sys.prefix is '/Users/Username/.../targetfolder' (should be '/Users/Username/.../targetfolder/venv')
ERROR: virtualenv is not compatible with this system or executable
'-p'オプションを使用して、AnacondaのPython 3インタプリタへのパスを指定できます。 – edwinksl
anacondaのpythonは通常、少なくともubuntuでは自動的に見つけられます。 virtualenvの外にあるとき、 'python'はanacondaのpythonを使いますか? –
はい、virtualenvの外側ではPython 3.5を使用します。それでもvirtualenvにロードする方法を考え出しています... –