Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 4.3.0
-
None
-
ghx-label-12
Description
-If python3-venv is not installed on Ubuntu systems, the "python3 -m venv" command will fail. bin/cmake_aux/create_py3_virtualenv.sh was intended to handle that and fall back to the impala-virtualenv command. That is working. Instead, it fails with this message:
Traceback (most recent call last): File "/home/ubuntu/Impala/infra/python/env-gcc10.4.0/lib/python2.7/site-packages/virtualenv.py", line 2633, in <module> main() File "/home/ubuntu/Impala/infra/python/env-gcc10.4.0/lib/python2.7/site-packages/virtualenv.py", line 859, in main create_environment( File "/home/ubuntu/Impala/infra/python/env-gcc10.4.0/lib/python2.7/site-packages/virtualenv.py", line 1161, in create_environment install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink) File "/home/ubuntu/Impala/infra/python/env-gcc10.4.0/lib/python2.7/site-packages/virtualenv.py", line 1531, in install_python shutil.copyfile(executable, py_executable) File "/usr/lib/python3.8/shutil.py", line 244, in copyfile raise SameFileError("{!r} and {!r} are the same file".format(src, dst)) shutil.SameFileError: '/usr/bin/python3' and '/home/ubuntu/Impala/shell/build/py3_venv/bin/python3' are the same file
This is because the failed "python3 -m venv" command left behind a directory, and the virtualenv command can't handle it. bin/cmake_aux/create_py3_virtualenv.sh should remove the directory before falling back to impala-virtualenv.