Writing a python module so that it can be removed

I am creating a Python package for PyPi:

# setup.py from setuptools import setup setup( name='ubuntudesign-asset-mapper', version='0.2', author='Robin', author_email=' robin.winslow@canonical.com ', url='https://github.com/ubuntudesign/asset-mapper', packages=[ 'ubuntudesign' ], description=( 'A mapping class for using the Ubuntu asset server.' ), long_description=open('README.rst').read(), install_requires=[ "requests >= 2.0" ] ) 

I put it on PyPi and I can install it:

 $ pip install ubuntudesign-asset-mapper Downloading/unpacking ubuntudesign-asset-mapper Downloading ubuntudesign-asset-mapper-0.2.tar.gz Running setup.py (path:/home/robin/.virtualenvs/assets-server/build/ubuntudesign-asset-mapper/setup.py) egg_info for package ubuntudesign-asset-mapper Requirement already satisfied (use --upgrade to upgrade): requests>=2.0 in /home/robin/.virtualenvs/assets-server/lib/python2.7/site-packages (from ubuntudesign-asset-mapper) Installing collected packages: ubuntudesign-asset-mapper Running setup.py install for ubuntudesign-asset-mapper Successfully installed ubuntudesign-asset-mapper Cleaning up... $ pip freeze | grep ubuntud ubuntudesign-asset-mapper==0.2 

But now this will not allow me to remove it:

 $ pip uninstall ubuntudesign-asset-mapper Can't uninstall 'ubuntudesign-asset-mapper'. No files were found to uninstall. 

I am sure because I did not write my setup.py correctly, but I can not find a link to this problem on the Internet, so I do not know what I did wrong.

+6
source share

Source: https://habr.com/ru/post/979942/


All Articles