Virtualenv error for another version of python

I get this error when I try to install virtualenv for a python version other than my default system:

-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 

The system is RedHat, and the default python version is 2.6.6. Any help is appreciated.

+5
source share

Source: https://habr.com/ru/post/1201557/


All Articles