admin管理员组

文章数量:1122832

I'm trying to upload a python module to testpypi using twine but I'm getting an error message that I don't understand. I'm including everything I know to include in this post, but please tell me if something else is needed. My profile for test.pypi is at /. The project I'm trying to upload is on github at . I included the /dist folder in the git upload.

First, I type this command and get the following results:

# python3 -m build
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
- hatchling
* Getting build dependencies for sdist...
* Building sdist...
* Building wheel from sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
- hatchling
* Getting build dependencies for wheel...
* Building wheel...

Then I run the following command and get the following error:

# python3 -m twine upload --repository testpypi dist/*
Uploading distributions to /
ERROR    InvalidDistribution: Metadata is missing required fields: Name, Version.
        Make sure the distribution includes the files where those fields are specified, and is using a supported Metadata-Version: 1.0, 1.1, 1.2, 2.0, 2.1,
        2.2, 2.3.

Here's some info on my system:

---- Ubuntu
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.5 LTS
Release:        22.04
Codename:       jammy
---- Python
Python 3.10.12

I don't know how to tell what Metadata-Version I'm using. I've found other support requests online for this error, but I can't make heads or tails of them. Any help is appreciated.

I'm trying to upload a python module to testpypi using twine but I'm getting an error message that I don't understand. I'm including everything I know to include in this post, but please tell me if something else is needed. My profile for test.pypi.org is at https://test.pypi.org/user/mikosullivan/. The project I'm trying to upload is on github at https://github.com/mikosullivan/uns-python. I included the /dist folder in the git upload.

First, I type this command and get the following results:

# python3 -m build
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
- hatchling
* Getting build dependencies for sdist...
* Building sdist...
* Building wheel from sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
- hatchling
* Getting build dependencies for wheel...
* Building wheel...

Then I run the following command and get the following error:

# python3 -m twine upload --repository testpypi dist/*
Uploading distributions to https://test.pypi.org/legacy/
ERROR    InvalidDistribution: Metadata is missing required fields: Name, Version.
        Make sure the distribution includes the files where those fields are specified, and is using a supported Metadata-Version: 1.0, 1.1, 1.2, 2.0, 2.1,
        2.2, 2.3.

Here's some info on my system:

---- Ubuntu
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.5 LTS
Release:        22.04
Codename:       jammy
---- Python
Python 3.10.12

I don't know how to tell what Metadata-Version I'm using. I've found other support requests online for this error, but I can't make heads or tails of them. Any help is appreciated.

Share Improve this question asked yesterday Mike O'SullivanMike O'Sullivan 1131 silver badge7 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 0

Make sure that you are using the latest version of pkginfo.

Do: python3 -m pip install -U pkginfo twine

Ensuring that everything is up-to-date.

本文标签: Unable to upload python module using twineStack Overflow