I'm using Debian 10 buster with python3.4
as the default python version.
sridharrajs@debian:~/Desktop/repos/demo$ python3 --version
Python 3.4.2
For one of my new projects I want to use python3.7
.
sridharrajs@debian:~/Desktop/repos/demo$ python3.7 --version
Python 3.7.3
When I create a virtual environment, it fails with AttributeError: module 'posix' has no attribute '__all__'
sridharrajs@debian:~/Desktop/repos/demo$ virtualenv -p python3.7 venv
Running virtualenv with interpreter /usr/local/bin/python3.7
Fatal Python error: initsite: Failed to import the site module
Traceback (most recent call last):
File "/usr/lib/python3.7/os.py", line 42, in _get_exports_list
return list(module.__all__)
AttributeError: module 'posix' has no attribute '__all__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/site.py", line 79, in <module>
import os
File "/usr/lib/python3.7/os.py", line 65, in <module>
__all__.extend(_get_exports_list(posix))
File "/usr/lib/python3.7/os.py", line 44, in _get_exports_list
return [n for n in dir(module) if n[0] != '_']
SystemError: <built-in function dir> returned NULL without setting an error
I tried Ubuntu 'Failed to import the site module' error message, Python 3 virtualenv problems, Using Python 3 in virtualenv