mikaeld commented on PR #24588: URL: https://github.com/apache/airflow/pull/24588#issuecomment-1511825931
I've nuked the virtualenv multiple times and arrive to the same outcome. Here's the latest attempt starting with a fresh Python interpreter. #### Step 1 ```shell ❯ pyenv install 3.7.16 Downloading Python-3.7.16.tar.xz... -> https://www.python.org/ftp/python/3.7.16/Python-3.7.16.tar.xz Installing Python-3.7.16... patching file Doc/library/ctypes.rst patching file Lib/test/test_unicode.py patching file Modules/_ctypes/_ctypes.c patching file Modules/_ctypes/callproc.c patching file Modules/_ctypes/ctypes.h patching file setup.py patching file 'Misc/NEWS.d/next/Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst' patching file Modules/_decimal/libmpdec/mpdecimal.h patching file setup.py Installed Python-3.7.16 to /home/mikaeld/.pyenv/versions/3.7.16 ❯ pyenv local 3.7.16 ❯ python -V Python 3.7.16 ❯ pip install virtualenv Collecting virtualenv Using cached virtualenv-20.21.0-py3-none-any.whl (8.7 MB) Collecting importlib-metadata>=4.8.3 Using cached importlib_metadata-6.4.1-py3-none-any.whl (22 kB) Collecting platformdirs<4,>=2.4 Using cached platformdirs-3.2.0-py3-none-any.whl (14 kB) Collecting filelock<4,>=3.4.1 Using cached filelock-3.11.0-py3-none-any.whl (10.0 kB) Collecting distlib<1,>=0.3.6 Using cached distlib-0.3.6-py2.py3-none-any.whl (468 kB) Collecting typing-extensions>=3.6.4 Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB) Collecting zipp>=0.5 Using cached zipp-3.15.0-py3-none-any.whl (6.8 kB) Installing collected packages: distlib, zipp, typing-extensions, filelock, platformdirs, importlib-metadata, virtualenv Successfully installed distlib-0.3.6 filelock-3.11.0 importlib-metadata-6.4.1 platformdirs-3.2.0 typing-extensions-4.5.0 virtualenv-20.21.0 zipp-3.15.0 WARNING: You are using pip version 22.0.4; however, version 23.1 is available. You should consider upgrading via the '/home/mikaeld/.pyenv/versions/3.7.16/bin/python3.7 -m pip install --upgrade pip' command. ❯ virtualenv .venv created virtual environment CPython3.7.16.final.0-64 in 74ms creator CPython3Posix(dest=/home/mikaeld/code/mozilla/airflow/.venv, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/mikaeld/.local/share/virtualenv) added seed packages: pip==23.0.1, setuptools==67.6.1, wheel==0.40.0 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator ❯ source .venv/bin/activate ``` ### Step 2 ```shell ❯ pip install -e ".[devel]" \ --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-source-providers-3.7.txt" [output omitted] [notice] A new release of pip is available: 23.0.1 -> 23.1 [notice] To update, run: pip install --upgrade pip ``` ### Step 3 ```shell ❯ airflow db init Traceback (most recent call last): File "/home/mikaeld/code/mozilla/airflow/.venv/bin/airflow", line 8, in <module> sys.exit(main()) File "/home/mikaeld/code/mozilla/airflow/airflow/__main__.py", line 48, in main args.func(args) File "/home/mikaeld/code/mozilla/airflow/airflow/cli/cli_config.py", line 50, in command func = import_string(import_path) File "/home/mikaeld/code/mozilla/airflow/airflow/utils/module_loading.py", line 36, in import_string module = import_module(module_path) File "/home/mikaeld/.pyenv/versions/3.7.16/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/mikaeld/code/mozilla/airflow/airflow/cli/commands/db_command.py", line 30, in <module> from airflow.utils.db_cleanup import config_dict, drop_archived_tables, export_archived_records, run_cleanup File "/home/mikaeld/code/mozilla/airflow/airflow/utils/db_cleanup.py", line 37, in <module> from airflow import AirflowException ImportError: cannot import name 'AirflowException' from 'airflow' (unknown location) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
