我对Python和osx终端都是一个完全的初学者,并且我尝试为python2.7.3和python3.4安装一些包。在
安装后,我无法让机械化既不能使用python2也不能使用python3。我得到:>>> from mechanize import *
Traceback (most recent call last):
File "", line 1, in
File "/Users/XXX/Desktop/mechanize-0.2.5/mechanize/__init__.py", line 119, in
from _version import __version__
ImportError: No module named '_version'
为了理解它为什么在我的桌面上搜索模块位置(我在那里下载了源代码并运行了设置.py我想知道我的Python安装是否混乱。在
我在这三个不同的地点找到了Python的资料:Macintosh HD/Library/Frameworks/Python.framework/3.4/ – [This is where Python 3 and its site-packages are stored]
Macintosh HD/System/Library/Frameworks/Python.framework/Versions/2.7/ – [I can't find any site-packages here]
Macintosh HD/Library/Python/2.7/ – [Only site-packages in this folder, nothing else]
最后一个放错地方了吗?在
我应该提一下,我在终端中默认使用一个非admin/non-sudo用户。所以当我安装软件包时,我会:
^{pr2}$
理想情况下,我希望清理我的Python安装,删除已安装的包,并将所有东西虚拟地放在virtualenv中。在