Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: upgrade my own package

Tags:

python

pip

I created and installed a python package by doing the following: coding a bunch of functions in an init.py file and run 'python setup.py install dist' to create a tar.gz, which was installed through pip. Everything works well and I can import the package and the functions. I decided to add a new function in the init file, and redid the whole procedure described above to reinstall (or update) my package. The new function added doesn't seem to be available when importing the package, even after update. Any ideas on how to update my package?

like image 680
me47 Avatar asked Feb 14 '26 09:02

me47


1 Answers

As @metatoaster suggested, python setup.py develop reflects changes immediately in the environment, and makes the new functions available. I haven't tried @Paul H's suggestion which is pip install . -e. Thank you both for your comments, problem is solved.

like image 199
me47 Avatar answered Feb 15 '26 23:02

me47