The package version for our app is 0.3.19 in both setup.py and in pyproject.toml since we use poetry. Everything works for publishing - it is visible in artifactory and can be pip install
'ed.
But then when running a script associated with it
[tool.poetry.scripts]
my_app = "my_app.my_app:main"
Then there is the error:
pkg_resources.VersionConflict: (hercl 0.3.19 (~/.pyenv/versions/3.8.12/envs/py38/lib/python3.8/site-packages)
, Requirement.parse('my_app==0.3.7'))
There is NO reference to 0.3.7 anywhere in any file in the root of this project. Only 0.3.19. So where is that coming from?
This turns out to be a corruption in the pyenv
environments on my local machine. There were old versions of the my_app
hanging around in the site_packages
. I nuked pyenv
, installed conda
and created a virtualenv
using conda
and the app pip install
's and works fine now