Broken executables in a virtual environment?
g2boojum opened this issue · 3 comments
I used pip to install pdftools in a python3 virtual environment, and the executables are broken. They all have a #! line that reads #!/usr/bin/python3
, when it really ought to read (in my case) #!/home/grant/Envs/py36/bin/python
, instead. Alternatively, #!/usr/bin/env python3
would work, too.
In the past I've used setuptools with a 'console_scripts' key in the 'entry_points' dictionary, and all of that has worked automatically for me, but you might have a better solution.
In any event, thanks for a nice tool! It's quite handy.
Thanks for reporting. At the time I wrote the pdftools I didn't think about usage in a virtual environment. Adding the scripts to the console_scripts key in setuptools would certainly solve this issue. I'm gonna give it a closer look asap.
Actually the shebang of all scripts reads #!/usr/bin/env python
in the current version. Which version are you using?
Sorry to be so slow to look at this. I have pdftools-1.1.1 installed. I used pip to uninstall and reinstall pdftools, and the pdfmerge.py and other scripts still had a #!/usr/bin/python3
shebang line. So, I opened the wheel that pip downloaded (pdftools-1.1.1-py3-none-any.whl), and sure enough, the scripts have a #!/usr/bin/python3
shebang line in the wheel. Huh.
I then downloaded the 1.1.1 zip file from github, and the scripts have #!/usr/bin/env python
shebang lines, just like they ought to have. I went ahead and just installed from git, which fixed the problem for me, but I'm not sure why the wheel in the cheeseshop is different.
Hope that helps. Thanks for a very handy program.