When using setuptools
you may get errors like
pkg_resources.VersionConflict: (mypkg 1.1.2 (~/mypkg), Requirement.parse(‘mypkg==1.1.0’))
This can come from when you’ve used one or the other of
entry_points:console_scripts, and still have the old script in your Python
For Anaconda Python, the
console_scripts are in a directory like
In general, check in the directory coming from:
python -c "import sys; print(sys.executable)"
After finding the old scripts, delete them (be sure they’re your old scripts, not something else you might need).
Suppose “setup.cfg” for package “mypkg” previously contained:
[options] scripts = myprog.py
and now the project is moving to the more robust entry_points technique like
[options.entry_points] console_scripts = myprog = mypkg.__main__:cli
Fix this error by deleting
- Minimal setup.py + setup.cfg with console_scripts entry_points