你知道如何解决这个问题吗?
bash-4.3$ pip show virtualenv
bash-4.3$ echo $PYTHONPATH
/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:
bash-4.3$ python
Python 3.5.2 (default, Jul 28 2016, 21:28:00)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/Library/Frameworks/Python.framework/Versions/3.4/bin', '/Users/mona', '/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python35.zip', '/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5', '/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/plat-darwin', '/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload', '/usr/local/lib/python3.5/site-packages', '/usr/local/Cellar/numpy/1.11.1/libexec/nose/lib/python3.5/site-packages']
我也有:
bash-4.3$ which python
/usr/bin/python
bash-4.3$ python --version
Python 3.5.2
我想和virtualenv一起使用Python3.5.2。
bash-4.3$ which virtualenv
bash-4.3$ brew info python3
python3: stable 3.5.2 (bottled), devel 3.6.0a3, HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/python3/3.5.2_1 (3,549 files, 54.0M) *
Poured from bottle on 2016-08-04 at 16:47:21
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python3.rb
==> Dependencies
Build: xz ✔, pkg-config ✔, sphinx-doc ✘
Required: openssl ✔
Recommended: readline ✔, sqlite ✔, gdbm ✔, xz ✔
Optional: homebrew/dupes/tcl-tk ✘, sphinx-doc ✘
==> Options
--universal
Build a universal binary
--with-quicktest
Run `make quicktest` after the build
--with-sphinx-doc
Build HTML documentation
--with-tcl-tk
Use Homebrew's Tk instead of OS X Tk (has optional Cocoa and threads support)
--without-gdbm
Build without gdbm support
--without-readline
Build without readline support
--without-sqlite
Build without sqlite support
--without-xz
Build without xz support
--devel
Install development version 3.6.0a3
--HEAD
Install HEAD version
==> Caveats
Pip, setuptools, and wheel have been installed. To update them
pip3 install --upgrade pip setuptools wheel
You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/usr/local/lib/python3.5/site-packages
See: https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Homebrew-and-Python.md
.app bundles were installed.
Run `brew linkapps python3` to symlink these to /Applications.
bash-4.3$ brew gist-logs python3
https://gist.github.com/2b54b2829f59415205bb41666ec7bec7
进一步详情:
compile ':pdf:0.6'