Bash: /home/runner/BingusTools/venv/bin/pip: No such file or directory

I am making a Python Repl but for some reason I can’t use the pip command.

I have tried executing pip --version in the shell but this just shows bash: /home/runner/BingusTools/venv/bin/pip: No such file or directory.
If I try to use pip install that shows the same error.
And when I try to install a package using the package installer, that raises a ModuleNotFoundError: No module named 'pip._internal' error and exits with exit status 1 and shows Replit: Package operation failed.

If someone can tell me how to get pip back then please help!

hmm did you remove the hidden venv folder? Recover it by running in shell:

python -m venv venv
pip install poetry

I ran the first command successfully but running the second one shows

An error occurred during configuration: option use-feature: invalid choice: 'content-addressable-pool' (choose from '2020-resolver', 'fast-deps', 'in-tree-build')

The solution previously provided in the post is sub-optimal and doesn’t always work.

Try creating a venv folder (just to see whether it already exists).

If venv does exist

Move to Nix modules (migrate your .replit and replit.nix config to match the latest version of the python template, and remove the hidden venv folder) so you can have your repl’s core functions updated and patched by replit immediately.

Otherwise (modules repl)

run in Shell, ignoring any poetry internal errors:

rm -r $PYTHONUSERBASE/{bin,lib/*/site-packages}/pip*
while read
do p=$REPLY
pip uninstall -y poetry
$p install --sync
} < <(type -ap poetry)


Avoid using pip manually and instead use poetry. If there’s a bug fix or feature that’s only available on upstream poetry, don’t update poetry but you could try and open a pull request. You could create an Ask topic to see if there’s a better way of solving your issue meanwhile. Even if you can fix it with a PR, you might have to open Bug Reports and link the PR for it to be noticed.

sed: can't read .config/pip/pip.conf: No such file or directory

What can I do ??

See if this works. If not, please create a new Python topic and fill in the template fields with relevant info (for the repl link, a minimal repl which reproduces the issue)

What do you mean by move to Nix modules? how do I do that?

click the links (the blue text) to see the documentation and the Nix module config you need to add

1 Like