question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`FileNotFoundError: [Errno 2] No such file or directory: 'README.md'` with uvicorn-0.2.1.tar.gz

See original GitHub issue

Description

When we try to install the dependencies of our project with pip 22.0.2, the following error occur: “Encountered error while generating package metadata”.

Expected behavior

We expected to have our dependencies installed without error, like with pip 21.3.1 and priors.

pip version

22.0.2

Python version

3.9.10

OS

Mac OS X 12.2 & Debian Bullseye

How to Reproduce

Install packages from the following requirements.txt:

aiodns
aiohttp
aioredis
asgiref
babel
backoff
beautifulsoup4
bleach
brotli
boto3
botocore
certifi
channels
channels_redis
chardet
cryptography
csscompressor
dj-database-url
django
django-admin-sortable2
django-compressor
django-countries
django-imagekit
django-markdown-deux
django-multiupload
django-phonenumber-field
django-s3-storage
fuzzy-c-means
freezegun
geomag
gunicorn
httptools
inflection
ipython
luhn
markdown2
natsort
numpy
opencv-contrib-python-headless
phonenumberslite
pillow
psutil
psycopg2-binary
python-dateutil
pytz
requests
ruptures
scikit-learn
scipy
sentry-sdk
tracking-url
unittest-xml-reporting
uvicorn
uvloop
websockets
whitenoise

Output

$ python3 --version
Python 3.9.10
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -U pip setuptools wheel
$ pip --version pip 
22.0.2 from /Users/jtremesay/projects/XXX/venv/lib/python3.9/site-packages/pip (python 3.9)
$ pip install -Ur requirements.txt
(snip)
Collecting websockets
  Using cached websockets-7.0.tar.gz (49 kB)
  Preparing metadata (setup.py) ... done
Collecting uvicorn
  Using cached uvicorn-0.8.5.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.8.4.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.8.3.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.8.2.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.8.1.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.8.0.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.7.3.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.7.2.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.7.1.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.7.0.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.6.1.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.6.0.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.5.2.tar.gz (23 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.5.1.tar.gz (23 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.5.0.tar.gz (23 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.4.6.tar.gz (22 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.4.5.tar.gz (22 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.4.4.tar.gz (22 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.4.3.tar.gz (22 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.4.2.tar.gz (21 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.4.1.tar.gz (21 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.4.0.tar.gz (21 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.32.tar.gz (21 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.31.tar.gz (21 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.30.tar.gz (21 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.29.tar.gz (21 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.28.tar.gz (22 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.27.tar.gz (22 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.26.tar.gz (22 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.25.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.24.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.23.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.22.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.21.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.20.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.19.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.18.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.17.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.16.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.15.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.14.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.13.tar.gz (20 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.12.tar.gz (19 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.11.tar.gz (19 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.10.tar.gz (19 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.9.tar.gz (19 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.8.tar.gz (19 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.7.tar.gz (19 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.6.tar.gz (18 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.5.tar.gz (18 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.4.tar.gz (18 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.3.tar.gz (18 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.2.tar.gz (18 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.1.tar.gz (18 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.3.0.tar.gz (16 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.22.tar.gz (15 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.21.tar.gz (14 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.20.tar.gz (13 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.19.tar.gz (13 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.18.tar.gz (13 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.17.tar.gz (12 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.16.tar.gz (12 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.15.tar.gz (12 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.14.tar.gz (11 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.13.tar.gz (11 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.12.tar.gz (11 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.11.tar.gz (11 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.10.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.9.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.8.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.7.tar.gz (11 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.6.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.5.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.4.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.3.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
  Using cached uvicorn-0.2.2.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
Collecting websockets
  Using cached websockets-3.3-py33.py34.py35.py36-none-any.whl (38 kB)
Collecting uvicorn
  Using cached uvicorn-0.2.1.tar.gz (10 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/qg/8rtxdx1n14d0yp808z4wscmm0000gn/T/pip-install-_5gde19q/uvicorn_7ce7d1df69b449fa9fc86c6ae610f771/setup.py", line 41, in <module>
          long_description=get_long_description(),
        File "/private/var/folders/qg/8rtxdx1n14d0yp808z4wscmm0000gn/T/pip-install-_5gde19q/uvicorn_7ce7d1df69b449fa9fc86c6ae610f771/setup.py", line 23, in get_long_description
          return open('README.md', 'r').read()
      FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pfmoorecommented, Jan 31, 2022

The error is because uvicorn-0.2.1.tar.gz won’t build. That in itself is a problem for the uvicorn project. But the question is why pip is trying to use such an old version of uvicorn. This is likely because of a conflict in your reqirements, but pip isn’t reporting what the conflict is.

Maybe that’s a result of #10655?

0reactions
jtremesay-sereemacommented, Jan 31, 2022

I suggest that if no one else is using your package as a dependency you take your current requirements file and look at your current successful installation and modify it to {requirement}>={successfully_installed_version},

I do not love the solution, but it resolve my problem, so I will go with it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Errno 2] No such file or directory: 'readme.md' - Stack Overflow
My problem didnt solve so I downloaded ghasedak from github with the below command pip install git+https://github.com/package-url/.
Read more >
Making a PyPI-friendly README
README files can help your users understand your project and can be used to set your project's description on PyPI. This guide helps...
Read more >
Python Packaging: Necessary Files (setup.py, requirements.txt ...
There are several files that are commonly included in the root folder of a Python project. These are: setup.py; readme.md; requirements.txt; __init__.py ...
Read more >
pip install for Python not working [Solved] • wyDay Forum
Collecting turboactivate Using cached https://files.pythonhosted.org/packages/21/3c/ ... FileNotFoundError: [Errno 2] No such file or directory: 'README.md'.
Read more >
README.md files | styleguide - Google
README.md files are Markdown files that describe a directory. GitHub and Gitiles renders it when you browse the directory. For example, the file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found