I recently wrote a package which comes with a command line tool. The setup.py looks something like this
from setuptools import setup
setup(...
entry_points = {
'console_scripts': [
'cmdname = modulename.binary:main',
],
},
...)
everything is fine when I install it without the --user flag via
$ sudo python setup.py install
$ cmdname
Yes, I'm here! Give me a command!
however, installing it without root access gives
$ python setup.py install --user
$ cmdname
-bash: cmdname: command not found
I guess there should be a directory where user scripts are linked to that should be exported to the PATH? How can I achieve that setuptools links to the entry point anyway? Or is that not possible?
The binary was installed to ~/.local/bin/
. Hence, adding export PATH=~/.local/bin:$PATH
to ~/.bash_profile
and
$ source ~/.bash_profile
solved the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With