'Pipenv cannot create bin folder Ubuntu 22.04 LTS

I'm trying to setup Pipenv on Ubuntu 22.04 LTS and I used:

sudo apt install pipenv

but I get an error:

FileNotFoundError: [Errno 2] No such file or directory: '/home/foo/.local/share/virtualenvs/hello-JDpq8NmY/bin/python'

I tried to update pip with:

curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10

Still no use.

I tried the solution suggested here and nothing changed.

The environment is there but the bin folder is missing.



Solution 1:[1]

I had the same problem. Remove pipenv from apt package manager and install pipenv with

pip install pipenv

After this you must set your PATH Variable to the pip dictionary.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mkrawutschke