pipenv install giving Failed to load paths errors
Asked Answered
A

4

10

I am running pipenv install --dev which is giving me the following errors

Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing dependencies from Pipfile.lock (2df4c1)…
Failed to load paths: /bin/sh: /Users/XXXX/.local/share/virtualenvs/my-service-enGYxXYk/bin/python: No such file or directory

Output: 
Failed to load paths: /bin/sh: /Users/XXXX/.local/share/virtualenvs/my-service-enGYxXYk/bin/python: No such file or directory

Output: 
Failed to load paths: /bin/sh: /Users/XXXX/.local/share/virtualenvs/my-service-enGYxXYk/bin/python: No such file or directory

I don't really want to change the command around I would rather solve the underlying issue as it is part of a package.json file in a project others are using rather than something i am just trying to run on my own machine..

Thanks

Alfi answered 10/8, 2020 at 14:3 Comment(0)
S
7

Remove your Pipfile.lock and try rerunning pipenv install to rebuild your dependencies from your Pipfile. It is looking for a virtual environment that does not exist. By removing your Pipfile.lock, you force pipenv to create a new environment.

Susie answered 6/9, 2020 at 1:10 Comment(1)
See also here.Lenis
W
1

I found the similar error on my ubuntu 20.04 like this :

frog@ocean:playground/demo-selenium $ pipenv install selenium
Installing selenium...
⠋ Installing...Failed to load paths: /bin/sh: 1: /home/frog/.local/share/virtualenvs/demo-selenium-aj4lh7NL/bin/python: not found

Output: 
⠙ Installing selenium...Failed to load paths: /bin/sh: 1: /home/frog/.local/share/virtualenvs/demo-selenium-aj4lh7NL/bin/python: not found

Output: 
Failed to load paths: /bin/sh: 1: /home/frog/.local/share/virtualenvs/demo-selenium-aj4lh7NL/bin/python: not found

Output: 
Error:  An error occurred while installing selenium!
Error text: 
/bin/sh: 1: /home/frog/.local/share/virtualenvs/demo-selenium-aj4lh7NL/bin/pip: not found

✘ Installation Failed 

How I solved is : When I run pipenv shell to create a new virtual environment, just add option --three or --two to specified the python version. Its because my linux doesn't install python 2. Then i run again, and voile i could install selenium, finnaly.

Waddell answered 10/4, 2021 at 3:57 Comment(0)
Q
1

I was getting the same error in my Windows, what worked for me was running pipenv --rm and then pipenv check. Then I was able to run pipenv install without failure.

Queston answered 13/1, 2022 at 15:14 Comment(0)
D
0

I ran pipenv --python 3.7 and then pipenv shell --three

It worked for me

Direction answered 15/5, 2021 at 14:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.