我正在运行 Ubuntu。我安装了python2.7和最新版本的Postgresql。
当我安装 psycopg 时,该软件包显示在默认的 Ubuntu 版本的 python 而不是我想要使用的 2.7 版本中。
我试图从我想要的目录中重新安装,但它仍然引用了另一个 python。当我打开 python shell 时,2.7 中的版本。
如何将 psycopg 安装到 2.7 中?
谢谢你的帮助。
乔
Stack after installation:
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 562, in <module>
main()
File "/usr/lib/python2.7/site.py", line 544, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib/python2.7/site.py", line 236, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib/python2.7/sysconfig.py", line 543, in get_config_var
return get_config_vars().get(name)
File "/usr/lib/python2.7/sysconfig.py", line 442, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib/python2.7/sysconfig.py", line 303, in _init_posix
makefile = _get_makefile_filename()
File "/usr/lib/python2.7/sysconfig.py", line 297, in _get_makefile_filename
return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config" + (sys.pydebug and "_d" or ""), "Makefile")
AttributeError: 'module' object has no attribute 'pydebug'