`pipenv shell` fails with path including spaces.
See original GitHub issuetsbertalan@sindri:~$ sudo pip install pipenv
... snip ...
tsbertalan@sindri:~$ cd dirname\ with\ spaces/
tsbertalan@sindri:~/dirname with spaces$ pipenv shell
Creating a Pipfile for this project...
Creating a virtualenv for this project...
New python executable in /home/tsbertalan/dirname with spaces/.venv/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/tsbertalan/dirname with spaces/.venv
Spawning environment shell (/bin/bash).
/bin/bash: /home/tsbertalan/dirname: No such file or directory
tsbertalan@sindri:~$ cd dirname\ with\ spaces/
tsbertalan@sindri:~/dirname with spaces$ pipenv shell
Creating a Pipfile for this project...
Creating a virtualenv for this project...
New python executable in /home/tsbertalan/dirname with spaces/.venv/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/tsbertalan/dirname with spaces/.venv
Spawning environment shell (/bin/bash).
/bin/bash: /home/tsbertalan/dirname: No such file or directory
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
python - Pipenv install acting weird
Failed to load paths: File "<string>", line 1 import sysconfig, distutils.sysconfig, io, json, sys; paths = {u'purelib': u'{0}'.format(distutils ...
Read more >pipenv Documentation
If pipenv isn't available in your shell after installation, you'll need to add the user base's binary directory to your PATH.
Read more >Advanced Usage of Pipenv - Python Packaging Authority
Pipenv allows you to open any Python module that is installed (including ones in your codebase), with the $ pipenv open command: $...
Read more >Basic Usage of Pipenv - Read the Docs
Pipenv is a reference implementation for using Pipfile. ... A proper shell configuration only sets environment variables like PATH during a login session, ......
Read more >Running Python and Jupyter with Pipenv | by Edward ...
Environments are the space in which developers work, learn, and create. ... If any issues arose be sure that you have run pipenv...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m going to leave this here for when someone eventually searches trying to solve this issue. While #99 solves the
pipenv
activation issue, most otherpipenv
commands still don’t work properly. After a couple hours of pulling threads, I came across this.virtualenv
, and thuspipenv
, calls the absolute path to the .venv directory to run things likepip
andpython
. Since these have a space in their path, the the linuxexec
call will always treat the first space it encounters as the end of the command. Anything after that is considered a parameter. This means anything in the form/home/user/path to dir/.venv/bin/pip
won’t work.So in order to address this, we’d need to allow the user to provide an alternative path for installing the virtualenv and then track that somewhere. That seems a bit excessive for a likely uncommon, and fairly avoidable, edge case. If it proves to be a significant problem, that’s probably the best route to go though. Until then, I don’t think we can support paths with spaces in a meaningful way.
@kfirbreger At this point Windows is not officially supported, so it was not something that was taken in to consideration. If Windows support is added then yes it will need to be changed.