[Python] Import error when using twine and wheel to upload python package to PYPI

Discussão em 'Python' iniciado por Stack, Julho 10, 2025.

  1. Stack

    Stack Membro Participativo

    I have a python package ready for distribution on PyPI. To do this I am using twine as recommended on the in the Python docs. I have my setup.py file and this previously worked using the setup.py register upload command for my previous release.

    To upload on to PyPi I am using:

    python setup.py sdist
    python setup.py bdist_wheel
    twine upload dist\PyCoTools-2.1.2-py2-none-any.whl #this was created in the previous line


    Now, on another computer I try using:

    pip install PyCoTools


    and it installs but then:

    >>> import PyCoTools


    Gives an import error. I go to the Libs/site-packages and all I see is this:

    [​IMG]

    i.e. no folder called PyCoTools, just the dist info.

    and inside that I just have [​IMG]

    Which (obviously) doesn't incude the files that are in my package. Could anybody give me some pointers as to what I'm doing wrong?

    Thanks

    Continue reading...

Compartilhe esta Página