Reputation: 2970
I am trying to develop a python package that is importable and also has entry_point to call from shell.
When trying to call the entry point I get:
pkg_resources.VersionConflict: (pysec-aws 0.1.dev1 (/Users/myuser/PycharmProjects/pysec-aws), Requirement.parse('pysec-aws==0.1.dev0'))
Essentially what I did before getting this error, is incrementing the version from 0.1.dev0
to 0.1.dev1
in setup.py, and running python setup.py sdist
and then pip install -e .
What am I doing wrong? What is the proper way to install development versions of packages you are actively developing and bundling with setuptools?
Upvotes: 1
Views: 814
Reputation: 2970
The only thing that fixed this issue was to create a new virtualenv.
Apparently my virtualenv/bin
had compiled (.pyc
) and non-compiled (.py
) references to the old version for some reason - they were probably not upgraded / removed when I installed the new version.
Once I created a new virtualenv and re-installed required packages I was able to resolve this issue.
Upvotes: 0
Reputation: 2505
The error is complaining that the application version does not match the version declared in setup.py. Try checking the __version__
set in your application.
You might consider using a single source for the version to avoid this problem. There are a number of different options outlined at https://packaging.python.org/guides/single-sourcing-package-version/. One simple technique, if there are not any external dependencies, is
import myapp
setup(
...
version=myapp.__version__
...
)
Upvotes: 1