'ModuleNotFoundError despite declairing install_requires in setup.py

I wrote my first package today and uploaded it to Test PyPI in order to test it, but I keep getting a ModuleNotFoundError for pandas when I try to import it to a virtual environment. I import pandas in a file in the package and therefore, declared it in setup.py under install_requires = ['pandas']. Before that, I had a setup.cfg and declared it in pyproject.toml\

[build-system]
requires = [
    "setuptools>=42",
    "pandas",
    "wheel"
]
build-backend = "setuptools.build_meta"

but neither worked. Am I declaring pandas at the wrong place? Are there some other files/folder-structure which I should share for solving this problem? Any help is welcome



Solution 1:[1]

Ok, so it did actually work as soon as I uploaded it to the "real" PyPl. I have no clue why it wouldn't work for Test PyPl, if you do know, feel free to enlighten us in the comments, I'll update the answer.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Martin Clever