I Have set pip option default-timeout to an invalid floating point, now can't run any pip commands - how can I reset this?

Viewed 115

I have accidentally set my pip option default-timeout to "'100'" rather than 100. Now whenever I run any pip command I get the error:

An error occured during configuration: option default-timeout: invalid floating-point value: "'100'"

I cannot seem to override this value back as that requires pip to configure first which then gives this error. Also, I can't use pip to uninstall pip and then reinstall it. I have also uninstalled and reinstalled python but the error persists. Any ideas for how to fix this?

1 Answers

You can manually change your pip configuration that exists in one of these directiories (depending on your system):

/etc/pip.conf
C:\ProgramData\pip\pip.ini
%APPDATA%\pip\pip.ini
%HOME%\pip\pip.ini
%VIRTUAL_ENV%\pip.ini

See https://pip.pypa.io/en/stable/topics/configuration/ for full documentation.

You should also be able to use --timeout 15 to override the default timeout.

Related