Y
Y
YariKartoshe4ka2019-11-20 19:05:40
Python
YariKartoshe4ka, 2019-11-20 19:05:40

Why do I get an error when downloading a project with pypi?

Deployed my project on pypi (first time, newbie):

[email protected]:~/Programming/Python3/Bash/lnevx_alg$ python3 setup.py register sdist upload
running register
running egg_info
writing lnevx_alg.egg-info/PKG-INFO
writing dependency_links to lnevx_alg.egg-info/dependency_links.txt
writing top-level names to lnevx_alg.egg-info/top_level.txt
reading manifest file 'lnevx_alg.egg-info/SOURCES.txt'
writing manifest file 'lnevx_alg.egg-info/SOURCES.txt'
running check
warning: Check: missing required meta-data: url

warning: Check: missing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied

warning: Check: This command has been deprecated. Use `twine check` instead: https://packaging.python.org/guides/making-a-pypi-friendly-readme#validating-restructuredtext-markup

The project's long description is valid RST.
Registering lnevx_alg to https://upload.pypi.org/legacy/
Server response (410): Project pre-registration is no longer required or supported, upload your files instead.
WARNING: Registering is deprecated, use twine to upload instead (https://pypi.org/p/twine/)
running sdist
creating lnevx_alg-1.0.0
creating lnevx_alg-1.0.0/lnevx_alg
creating lnevx_alg-1.0.0/lnevx_alg.egg-info
copying files to lnevx_alg-1.0.0...
copying README.rst -> lnevx_alg-1.0.0
copying setup.py -> lnevx_alg-1.0.0
copying lnevx_alg/__init__.py -> lnevx_alg-1.0.0/lnevx_alg
copying lnevx_alg/core.py -> lnevx_alg-1.0.0/lnevx_alg
copying lnevx_alg.egg-info/PKG-INFO -> lnevx_alg-1.0.0/lnevx_alg.egg-info
copying lnevx_alg.egg-info/SOURCES.txt -> lnevx_alg-1.0.0/lnevx_alg.egg-info
copying lnevx_alg.egg-info/dependency_links.txt -> lnevx_alg-1.0.0/lnevx_alg.egg-info
copying lnevx_alg.egg-info/top_level.txt -> lnevx_alg-1.0.0/lnevx_alg.egg-info
Writing lnevx_alg-1.0.0/setup.cfg
Creating tar archive
removing 'lnevx_alg-1.0.0' (and everything under it)
running upload
Submitting dist/lnevx_alg-1.0.0.tar.gz to https://upload.pypi.org/legacy/
Server response (200): OK
WARNING: Uploading via this command is deprecated, use twine to upload instead (https://pypi.org/p/twine/)

As you can see, everything goes well, and 200 OK is displayed.
But when I then try to download the project from PIP3, I see the following error:
[email protected]:~/Programming/Python3/Bash/lnevx_alg$ pip3 install lnevx_alg
Collecting lnevx_alg
  Downloading https://files.pythonhosted.org/packages/a8/03/782d3ac22540686dca3cd128da405e0333ffc33a5b1baeaeb33430bda73f/lnevx_alg-1.0.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mdlpb5mf/lnevx-alg/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mdlpb5mf/lnevx-alg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-install-mdlpb5mf/lnevx-alg/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-mdlpb5mf/lnevx-alg/setup.py", line 10, in <module>
        long_description=open(join(dirname(__file__), 'README.txt')).read(),
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-mdlpb5mf/lnevx-alg/README.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

What could be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
_
_, 2019-11-21
@mrxor

setup.py tries to take description from README.txt, while README.rst is loaded in the project Correct
the file name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question