question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spaces in Python path make pip-installed launchers fail on Windows

See original GitHub issue

Launchers (console_scripts) installed via pip under Windows fail when Python is installed in a path that contains spaces (e.g. C:\Program Files (x86)\..., which will be the default directory for 3.5):

$ pip install vanity
$ vanity
Failed to create process.

It does work, when the package is installed manually via python setup.py install. Also, both ways install the same <packagename>.exe launcher (so this is different from #1997 and #1999).

Via pip install, the shebang in <packagename>-script.py is #!C:\Program Files (x86)\Python27\python.exe instead of (via python setup.py install) #!"C:\Program Files (x86)\Python27\python.exe"

Note that both launcher scripts actually work when executed directly: only the launcher .exe seems to be more strict about quoting. So it may be good to (also) make the launcher more forgiving (is the bug tracker for distlib non-public?).

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:5
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
fkrullcommented, Jul 23, 2016

FYI: The fix for the underlying setuptools issue (https://github.com/pypa/setuptools/issues/398) is now merged there.

2reactions
z3ntucommented, Jul 22, 2016

BUMP!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[venv / PC/launcher] issue with a space in the installed python ...
msg412874 ‑ (view) Author: Kesh Ikuma (hokiedsp) Date: 2022‑02‑08 22:48 msg412883 ‑ (view) Author: Eryk Sun (eryksun) * Date: 2022‑02‑09 00:29 msg412885 ‑ (view) Author:...
Read more >
Pip - Fatal error in launcher: Unable to create process using
Navigate to the path "C:\Users...Python\Python37-32\Scripts" · Delete the files pip ,pip3 , pip3.7 · Then I used the command python -m pip install...
Read more >
Python pip – How to get around Fatal error in launcher
On some Windows machines pip has a problem caused by spaces in the Python installation path. When you try: Note: replace tweepy with...
Read more >
Working with the AWS CDK in Python
If you encounter a permission error, run the above commands with the --user flag so that the modules are installed in your user...
Read more >
Robot Framework User Guide
When installing Python on Windows, it is recommended to add Python to PATH to make it and tools like pip and Robot Framework...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found