克隆flickr-views-counter源码执行setup时无法找到flickrapi索引页求助
Hey there, let's sort out this issue you're facing. When you install via pip install flickr-views-counter, pip handles dependencies smoothly because it uses up-to-date PyPI configuration. But running the source's setup.py directly is throwing an error because it's trying to use an outdated PyPI endpoint (https://pypi.python.org/simple/) which is no longer supported, or there's a dependency resolution quirk with the old setup tooling.
Here are the steps to fix this:
First, upgrade your packaging tools to ensure they can properly resolve dependencies from the current PyPI:
pip install --upgrade setuptools pipManually install the missing dependency first, then run the setup script:
Install flickrapi directly via pip (which will use the correct PyPI source):pip install flickrapiThen navigate to your cloned flickr-views-counter directory and run:
python setup.py installUse pip to install from the local source (recommended) — this is a more reliable approach than running
setup.pydirectly, since pip will automatically handle all dependency resolution for you:
Navigate to the root of your cloned repository and run:pip install .Check the setup.py for outdated PyPI references (if the above steps don't work):
Open thesetup.pyfile and look for any hardcoded PyPI URLs. Replacehttps://pypi.python.org/simple/withhttps://pypi.org/simple/to point to the current PyPI index. Also double-check that the dependency is spelled correctly asflickrapi(no typos!).
The core issue here is that direct setup.py runs often rely on older tooling that doesn't use the modern PyPI configuration that pip defaults to. Using pip to handle the installation (even from local source) avoids these pitfalls.
内容的提问来源于stack exchange,提问作者Rex Block

