AttributeError: 'zipimport.zipimporter' object has no attribute 'exec_module'
Get this error trying to run module. Seems to happen no matter what. Maybe changes since Python>3.5 based on this project's error? https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6177
$ typer name_of_my_module run
Traceback (most recent call last):
File "/usr/local/bin/typer", line 8, in
Versions:
Python 3.6.9 (default, Jul 17 2020, 12:50:27) [GCC 8.4.0] on linux
Requirement already up-to-date: typer in /usr/local/lib/python3.6/dist-packages (0.3.2) Requirement already satisfied, skipping upgrade: click<7.2.0,>=7.1.1 in /home/h/.local/lib/python3.6/site-packages (from typer) (7.1.2)
Collecting typer-cli Downloading typer_cli-0.0.11-py3-none-any.whl (8.9 kB) Requirement already satisfied, skipping upgrade: colorama<0.5.0,>=0.4.3 in /usr/local/lib/python3.6/dist-packages (from typer-cli) (0.4.3) Requirement already satisfied, skipping upgrade: shellingham<2.0.0,>=1.3.2 in /usr/local/lib/python3.6/dist-packages (from typer-cli) (1.3.2) Requirement already satisfied, skipping upgrade: importlib_metadata<3.0,>=1.5 in /usr/local/lib/python3.6/dist-packages (from typer-cli) (1.7.0) Requirement already satisfied, skipping upgrade: typer<0.4.0,>=0.3.0 in /usr/local/lib/python3.6/dist-packages (from typer-cli) (0.3.2) Requirement already satisfied, skipping upgrade: zipp>=0.5 in /home/h/.local/lib/python3.6/site-packages (from importlib_metadata<3.0,>=1.5->typer-cli) (0.5.2) Requirement already satisfied, skipping upgrade: click<7.2.0,>=7.1.1 in /home/h/.local/lib/python3.6/site-packages (from typer<0.4.0,>=0.3.0->typer-cli) (7.1.2) Installing collected packages: typer-cli Attempting uninstall: typer-cli Found existing installation: typer-cli 0.0.10 Uninstalling typer-cli-0.0.10: Successfully uninstalled typer-cli-0.0.10 Successfully installed typer-cli-0.0.11
Also facing this issue.
I'm using pipenv. To fix this, I just did pipenv --rm and reinstalled everything again, including typer-cli and it worked.
I think this issue has been fixed in the python standard library: https://bugs.python.org/issue42131
You can reduce the version of the package "Markdown". I also meet this problem, then I uninstall "Markdown" which is 3.5 and reinstall a new one which is 3.1.