Python Entry point 'console_scripts' not found
Hmm, this is all a bit opaque to debug -- I think the implementation of entry points might suffer from too much indirection. So entry points work as follows:
- When installing a script with an entry point a placeholder script is placed on your path
- This script contains the name of your package, and the name of the entry point
- This is used to look up an entry in a metadata file called
entry_points.txt
which lives inegg-info
directories ordist-info
directories
I suspect this level of indirection allows you to change what entry points point at without reinstalling the binary entry points, which may be deemed as advantageous.
This means that if there are stale or shadowing dist-info
or egg-info
files can lead to the wrong entry points being loaded.
A quick
strace 2> >(grep --line-buffered entry_points.txt) -e open package
will tell you which entry point is being used. You can then verify if this is stale / incorrect.
Investigation of the relevant site-packages folder clued me that my python setup.py install
command was not putting all the relevant files where they needed to be.
I'm still not 100% of the underlying cause of the issue, but I was only able to get my site-packages folder to truly update by passing setup.py the --force
argument as in
python setup.py install --force
Now my site-packages folder contains the relevant command_line.py, and the console entry point works as expected.