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.

Executing packages stored in a folder with spaces (Windows OS)

See original GitHub issue

Environment

  • pip version: 19.2.3
  • Python version: 3.8.3
  • OS: Windows 10 Pro (build 1909)

Description Executing a pip script, when packages are stored in a location with spaces in the path fails

Expected behavior Path should’ve been wrapped with quotes, so that spaces are ignored.

How to Reproduce Move your appdata folder to a path with spaces in guide here.

Use Windows Explorer to right-click on current Roaming folder and right-click on “Location” tab. Set the new location and follow the assistance when it suggest you to move the content of the folder to the new location.

  1. Get any package
  2. Then execute that package via a CLI
  3. An error occurs, showing that it’s trying to open the file up to the first space, rather than the complete path.

On my local machine, I store my AppData folder in a path that has spaces. For example:

PS D:\Code> awslocal

D:\Code>python D:\Windows User Data\AppData\Roaming\Python\Python38\Scripts\awslocal
python: can't open file 'D:\Windows': [Errno 2] No such file or directory
PS D:\Code>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pfmoorecommented, Jul 1, 2020

It sounds like awslocal is using the older scripts mechanism for providing wrapper scripts, not the newer console_scripts entry point method.

0reactions
MarkSFranciscommented, Jul 1, 2020

Gotcha. I’ll close this then. Thanks for your help

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to call a program that contains space in filename?
All filenames and paths which contain spaces must be quoted. Next, regarding your question, how about stating the path like:
Read more >
Long filenames or paths with spaces require quotation marks
This article provides a solution to an issue that occurs when you specify long filenames or paths with spaces. Applies to: Windows 10...
Read more >
whitespaces in the path of windows filepath - python
There is no problem with whitespaces in the path since you're not using the "shell" to open the file. Here is a session...
Read more >
Windows user space issues with installing R packages
The environment variables TMPDIR, TMP and TEMP are checked in turn and the first found which points to a writable directory is used:...
Read more >
What are workaround steps if Windows user name ... - GitHub
The issue Various tools based on Conda (the Anaconda command line and Navigator in my case) still cannot handle spaces in Windows folder...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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