Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-12242

bin/cmake_aux/create_py3_virtualenv.sh doesn't successfully fall back to impala-virtualenv

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 4.3.0
    • Impala 4.3.0
    • Infrastructure
    • 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.

       

      Attachments

        Activity

          People

            joemcdonnell Joe McDonnell
            joemcdonnell Joe McDonnell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: