Why Binder can't find any libraries?

Hi!

I have a Jupyter Notebook code that imports the following libraries:

import urllib.request as ur
import bs4 as bs
import texthero as hero
from texthero import stopwords
import pandas as pd
import re
import gensim
from gensim.summarization import keywords, summarize
import matplotlib.pyplot as plt
import ipywidgets as widgets

When trying to execute this notebook through the mybinder the builder logs says that it can’t find these libraries.
For example:

mybinder ERROR: Could not find a version that satisfies the requirement bs4==4.7.1 (from -r requirements.txt (line 1)) (from versions: 0.0.0, 0.0.1)
ERROR: No matching distribution found for bs4==4.7.1 (from -r requirements.txt (line 1))

I changed the bs4==0.0.1 and then it was OK but why the mybinder finds only the version 0.0.1?
After that the problem was with the re library but then it says that no version is available. And so on.

ERROR: Could not find a version that satisfies the requirement re==2.2.1 (from -r requirements.txt (line3)) (from versions: none)
ERROR: No matching distribution found for re==2.2.1 (from -r requirements.txt (line 3))

requirements.txt file contains the following settings:

urllib==3.7
requests==2.21.0
bs4==0.0.1
texthero==1.0.9
pandas==1.0.5
re==2.2.1
gensim==3.8.3
texthero==1.0.9
matplotlib==3.2.2
ipywidgets==7.4.2

I am using Windows 10 and anaconda custom version (py37_1). Quite a pain to get it done. How to solve the problem?

First remove version setting and try. Is there a particular package that you need a particular version for? If so, try only specifying that one.

Then once you get a set that works in binder, get the versions for each and try setting those versions if it matters to you to have all pinned.

Hi, I am still having this issue. I am brand new to binder and don’t know how to get around this. The error I get is:
ERROR: No matching distribution found for pandas==1.4.4

You are tagging onto a three year-old issue by someone else and providing less information than was originally provided by the original person posting.

I assume you are using MyBinder? What are you using as a configuration file? Since things that run at MyBinder have to be public it is usually best when posting an issue to include the link to the associated repository. Usually looking at what that gives provides more information than having to post it all here.

My guess without looking though is you are using Python 3.7, and so it won’t work because it sys on the left side of the Python Package Index entry for version 1.4.4 of Pandas, " Requires: Python >=3.8". (Launches from the conda example and with a typical requirements.txt [e.g., here] only give 3.7 at present.) If you had said what sort of configuration file you are using, I could guide you in how to specify the version of Python along with your specified version of Pandas.

Update:
Noting that this was cross-posted here and I tried to further advise there as what was posted there reflected a poor understanding and was short-sighted as it will lead to problems when the default version of Python changes yet again at a future date. If the OP didn’t care about the version of Pandas, which seemed the be the case given the OP’s proposed work-around, then not pinning the version at all is advisable as the current most recent version of Pandas compatible with the current default version of Python will get used. So even as the default version of Python evolves with time, the images backing the sessions should still build without error and launch.