Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

274
Visualizações
Published by twine python package does not appear in repository

I'm trying to publish my python package to private repository. I followed the official guide https://packaging.python.org/en/latest/tutorials/packaging-projects/ and everything seemed to be good. Here's terminal output:

(venv) C:\Users\xxx\PycharmProjects\my_package>twine upload --config-file .pypirc -r pypi dist/*
Uploading distributions to http://xxx/pypi/simple/
Enter your password:
Uploading my_package-0.1-py3-none-any.whl
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8.03k/8.03k [00:01<00:00, 4.83kB/s]
Uploading my-package-0.1.tar.gz
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7.40k/7.40k [00:00<00:00, 10.3kB/s]

But after publishing I can't see my package in repository neither by opening url in browser nor I can install it by pip.

I noticed that .whl comes with an underscore in name while .tar.gz comes with a dash. May it be be the issue? How can I find out what is wrong?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Sure does not matter your package uploaded to private or public repository. You can even do not upload it to Git to publish it.

You can do that in 4 basic steps

  • Create a python package
  • Write setup.py
  • Build the package
  • Publish to PyPI via twine

Create a python package

At following example the demoverflow folder contains __init__.py which is making demoverflow a python package.

└── demoverflow
    ├── demo.py
    └── __init__.py
# demo.py

class Demo:
    ...

import Demo at __init__.py to be able to import it from demoverflow (like: from demoverflow import Demo)

# __init__.py

from demo import Demo

Write setup.py

from setuptools import setup, find_packages

setup(
    name="demoverflow",
    version="0.0.1",
    author="Firstname Lastname",
    author_email="<demoverflow@support.com>",
    description="My demo package",
    packages=find_packages(),
    install_requires=[],
    keywords=['python'],
    classifiers=[
        "Development Status :: 1 - Planning",
        "Intended Audience :: Developers",
        "Programming Language :: Python :: 3",
        "Operating System :: Unix",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
    ]
)

NOTE: Before build the package you should have the following file structure

├── demoverflow
│   ├── demo.py
│   └── __init__.py
└── setup.py

So setup.py and your package should be a neighbours

Build the package

If you already installed setuptools then can run following command to generate dist folder

python3 setup.py sdist bdist_wheel

Publish to PyPI

This command will require username and password of your PyPI account

twine upload dist/*
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda