Pip install -r requirements.txt taking forever

Question:
I ran pip install -r requirements.txt

These are the dependencies in requirements.txt:

reflex
pandas
yfinance
requests
pyrebase4
email_validator
python-dotenv
urllib3==1.26.15
requests-toolbelt==0.10.1

I’m on a pro plan, but this command has been taking hours to resolve. It looks like pip is looking at multiple versions to figure out compatibility as you can see from the example logs below.

What can I do to stop repl.it from looping through each version so that my dependencies are installed faster?

Example logs:

INFO: pip is looking at multiple versions of requests to determine which version is compatible with other requirements. This could take a while.
Collecting requests
  Downloading requests-2.30.0-py3-none-any.whl (62 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 62 kB 3.4 MB/s 
  Downloading requests-2.29.0-py3-none-any.whl (62 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 62 kB 2.5 MB/s 
  Using cached requests-2.28.2-py3-none-any.whl

This is why all of your dependencies should be specified with a version. Is this your own requirements.txt or is it source code from another project? If it is your own project, use something such as pip freeze requirements.txt (probably not a good idea with Replit but there are other alternatives) to get accurate versions of your dependencies.

If it’s another user’s project, I don’t really know what to tell you, ask the project owner or attempt to install each dependency manually?

1 Like