The package version does not appear to be updating when importing locally with pipenv, even when in editable (developer) mode

Viewed 14

I have written a small python package on my machine and made it importable with distutils. My setup.py has version='0.0.3'.

In a separate folder, I have a Pipenv environment and I install the package with the command:

pipenv install -e ~/path/to/my_pack

I then get the version with the commands:

pipenv run python
>> import pkg_resources  # part of setuptools
>> version = pkg_resources.require("my_pack")[0].version
>> print(version)
0.0.3
>> exit()

Next, I change the version in setup.py to 0.0.4 and run the above Python again, but it still says 0.0.3. Why is this? How can I fix it?

If I add functions inside the my_pack code base, I can see them when I restart Python, but the version never changes.

0 Answers
Related