Need some help on the pypi upload

Just check this blog explained the issue here

@SriKaleeswarar the error message is due to you’re not using virtual environment for the project.

To precisely say

  1. create a virtual environment and install the packaging and your project dependencies there will be helpful for experiment and isolation. (environment managed by external error )
  2. Meta-Version : Supported by twine is upto 2.2 but your meta version is 2.4 which is not matching to the meta data version generated by hatchlink iam not familiar with hatch (InvalidDistribution)
    (or)
    explore the twine to upload to the latest api in the image you have shared i can see upload.pypi.org/legacy supports metadata upto 2.2
    (or)
    downgrade hatch metadata-version to 2.2

@SriKaleeswarar Kindly update the steps you used to sort out the pypi release problem in setting up the build environment as another blog that will help others.

pypi uploading twine workflow issue fixed by updating the credentilals properly in .pypirc file on 01-02-2026 Kanchilug Meet

Here is the dummy reference for that .pipyrc file

index-servers = 
pypi

[pypi]
username = __token__ 
password =  <your api token for uploading in the pypi package repository>

1 Like