Error in Virtual Enviornment install packages

I get this error when I try to install any package: An error occurred during configuration: option use-feature: invalid choice: ‘content-addressable-pool’ (choose from ‘fast-deps’, ‘truststore’, ‘no-binary-enable-wheel-cache’)

(https://replit.com/@Sportysoccersoc/Python#main.py)

Screenshots, links, or other helpful context:

An error occurred during configuration: option use-feature: invalid choice: 'content-addressable-pool' (choose from 'fast-deps', 'truststore', 'no-binary-enable-wheel-cache')

Type this command in the shell:

sed -i 5,7d .config/pip/pip.conf

I tried that but it come up with sed: can't read .config/pip/pip.conf: No such file or directory

hmmm… the repl you linked has that path, so try this:
Show hidden files. Then open .config/pip/pip.conf. Delete the last 3-4 lines.
If there is no .config folder and no venv folder, and there is (possibly) a .pythonlibs folder, then try opening your replit.nix file and making the deps list empty.

Alternatively, you can create a new repl and copy in all of your code. (Downloading as zip and then uploading is good for many files.) The new templates are better and run more recent versions of python.

Could it be a thing with the package? I am trying to install flask-mysqldb but it still doesnt work

I tried using pip config set --user global.use-feature fast-deps But its comes up with an error saying ERROR: Fatal Internal error [id=2]. Please report as a bug.

So, is there a pip.conf file you can edit in your repl? Instead of setting use-feature, I’d recommend to unset it (pip config unset). But if the command line doesn’t work, then edit the file directly.

I dont see one unless it is hidden from us

Its a hidden file, you need to show hidden files. The .config folder isn’t in the newer python templates, but the newer python templates don’t have pip errors usually.
The repl you linked is an older template and does have the file.
Try some things:
Type ./.config in shell, it will tell you if the directory exists.
If it doesn’t exist, try using pip config unset <...> command. And also try upgrading pip (pip install --upgrade --user pip I think).
But if it does exist, there should be a pip.conf file you can edit.

If nothing works, the easiest thing to do is to copy all of your code into a new python repl.

Those will both fail. Invalid pip configs break all pip commands, including the config commands you’d need to unset it.

1 Like

Okay.
I checked the repl the OP linked, which does have the config file that had the problem, and it looks like the error should no longer be occurring (looking at the changed contents of the file). So I guess the OP found the file and fixed it probably.