issue upgrading typer 0.9.0 to 0.12.0 (typer directory in site packages appears to contain only typer-cli) #784
-
First Check
Commit to Help
Example Code$ python3.8 -m virtualenv venv
$ . venv/bin/activate
$ pip install typer==0.9.0
$ pip install typer==0.12.0
$ ll venv/lib/python3.8/site-packages/typer/
total 36
drwxrwxr-x 3 brianm brianm 4096 Mar 31 17:52 ./
drwxrwxr-x 28 brianm brianm 4096 Mar 31 17:52 ../
-rw-rw-r-- 1 brianm brianm 9149 Mar 31 17:52 cli.py
-rw-rw-r-- 1 brianm brianm 6689 Mar 31 17:52 _completion_classes.py
-rw-rw-r-- 1 brianm brianm 30 Mar 31 17:52 __main__.py
drwxrwxr-x 2 brianm brianm 4096 Mar 31 17:52 __pycache__/ DescriptionAfter upgrading typer 0.9.0 to 0.12.0 in an existing virtual environment, the Operating SystemLinux Operating System DetailsUbuntu 22.04.3 Typer Version0.12.0 Python Version3.8.18 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 12 replies
-
A workaround in case it helps anyone else, uninstall $ pip uninstall typer-slim
$ pip install typer==0.12.0 Uninstalling just Or of course just recreate the virtual environment |
Beta Was this translation helpful? Give feedback.
-
I had the same problem. After further inspection, I think it is indeed due to the recent packaging changes. Here is what I found: ProblemAfter the latest packing changes, During the upgrade from a lower version, the dependencies will be installed before the old version is uninstalled (from pip's source code). So what happens are:
Edit: ConsequencesThis leads to a few things:
These issues would create quite confusion as someone upgrading from an older version will encounter it while someone doing a fresh install will not. SolutionI suppose the solution would be changing pack to the previous packaging and converting |
Beta Was this translation helpful? Give feedback.
-
I also witnessed this when using
which made it clear that something is messed up |
Beta Was this translation helpful? Give feedback.
-
@tiangolo I think this might require your attention |
Beta Was this translation helpful? Give feedback.
-
I posted a related issue: #786 |
Beta Was this translation helpful? Give feedback.
-
Upgrading to
|
Beta Was this translation helpful? Give feedback.
This was fixed in #791, released in Typer
0.12.1
🚀 🎉