The article directories

  • 0 results
  • One way to
  • 2 uninstall

0 results

If you want to use your own modules or contribute your own code modules, you may need to use the content of this article. The content is very simple, and THE fact that Python is so friendly to contributing code is, I think, a big reason its community has grown so well.

One way to

  • 1. Create a new folder and put your Python code in it.
  • Create a setup.py file and write your own information to it, for example:
from  distutils.core import setup
setup(
    name = 'testInstall',
    version = '1.2.0',
    py_modules = ['testInstall'],
    author = '* *',
    author_mail = '* *',
    description = 'Test Installation library'
)
Copy the code
  • 3, use the following command:
Py sdist Install publisher: sudo python3 setup.py install Upload project: twine Upload dist/ projectCopy the code

2 uninstall

If you do not want to use your own library, you can use the following method:

>>> import sys
>>> sys.path
Copy the code

Find the location of the installation package and delete the content related to the name.