Python Forum
What to do when the requirements.txt file does not work
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What to do when the requirements.txt file does not work
#1
I tried to install the environment using requirements.txt file shown below. I used the usual command

pip install -r ....

Output:
#python==3.7.7 pandas==1.0.5 numpy==1.18.5 requests==2.24.0 scikit-learn==0.23.1 tqdm==4.47.0 beautifulsoup4==4.9.1 spacy==2.3.1 gensim==3.8.0 ratelimit==2.2.0 pyldavis==2.1.2 matplotlib wordcloud
It failed on a Windows 10 laptop and on an Apple M1 MacBook air. I believe that I know why. These files or at least some of them are outdated.

I tried install each file separately using

conda install ...

I could even specify the version of the library that I wanted. On several files that did not work, but this did

pip install ...

I still could not get all the file versions that I wanted.

What now?

My only guess is three ways:

1. give up

2. try to make the program work with the files that are installed even if hey are not always the correct version.

3. Install file and its version using a conda forge install. It seems that library has earlier versions of the files that I want to install. I really need those earlier versions.

I am not sure what to do please advise.

Thanks in advance.

Respectfully,

LZ
Reply
#2
I'd suggest keeping your dependencies up to date really. You don't want to be using obsolete versions because the newer ones will have improvements of various kinds, but are also obviously supported (the developers will have little to no incentive to support older versions).
Reply
#3
Where are getting this from Repo/website/blog...?
Should run it in virtual environment to avoid conflict as there serval are old packages here,
some will also need a compiler eg MSVCCompiler.

Usually there are some info about project and what is needed to run it,
have to be aware that many of these data science project is made once to show the concept and then never updated anymore.
Some more serious project that have some user base will often make more effort and make it eg pip install package(then no requirements.txt is needed),
as all is set in setup.py then package version is usually not locked,can be set less that.

To force upgrade from requirements.txt.
pip install --upgrade --force-reinstall -r requirements.txt
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with code / audio is playing randomly, not matching csv requirements Daniel_kcr 2 630 Sep-07-2023, 05:09 PM
Last Post: deanhystad
  when package built, requirements not installed sabuzaki 1 742 Apr-07-2023, 09:01 AM
Last Post: sabuzaki
  Examples of Customer requirements ComputerAstronaut 1 1,842 Dec-08-2020, 03:22 AM
Last Post: Larz60+
  requirements file tdwinfre 7 2,772 Nov-06-2020, 06:01 AM
Last Post: tdwinfre
  How to allow user input only if certain requirements are met vininhosts 3 2,340 May-28-2020, 06:15 PM
Last Post: micseydel
  Requirements for html5print module KipCarter 6 5,194 Mar-16-2020, 03:12 PM
Last Post: KipCarter
  google-auth requirements.txt strange behavior randalpinto 3 3,742 Dec-21-2018, 02:03 AM
Last Post: Larz60+
  Can't get a downloaded file converter to work Godotisnothere 1 3,177 Jan-24-2017, 06:01 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020