另一个python版本的virtualenv错误

时间:2014-09-01 10:23:40

标签: python virtualenv redhat

当我尝试为除系统默认设置之外的某个版本的python设置virtualenv时,我收到此错误:

-sh-4.1$ virtualenv -p /usr/local/bin/python2.7 test
Running virtualenv with interpreter /usr/local/bin/python2.7
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/virtualenv.py", line 8, in <module>
    import base64
  File "/usr/local/lib/python2.7/base64.py", line 9, in <module>
    import struct
  File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
    from _struct import *
ImportError: No module named _struct

System是RedHat,默认系统python版本是2.6.6。任何帮助将非常感激。

0 个答案:

没有答案