pip3 read time out error pip3 read time out error python-3.x python-3.x

pip3 read time out error


Setting the default socket timeout to a higher value (e.g. 1000 seconds) should fix your problem:

pip3 install -U --timeout 1000 scikit-learn

The suitable timeout value, of course, depends on your connection speed and quality. Note that the socket timeout, AFAIK, is the maximum time the socket-level data flow is interrupted before an error is raised, not the total time needed to download packages.


Set timeout to a high value. Also it's recommended to run the below command always:

python3 -m pip install --user --timeout 10000 scikit-learn

You maybe asking why should I enter python3 -m as extra and type a few more strings. It's basically to avoid conflicts when you working with multiple virtual environments.

Python core developer Brett Cannon explains why you should install packages like this in his article A quick and dirty guide on how to install python packages.


Make sure you are using IPV4 and not IPV6.