Replacing a sourcecode inside an installed python package in Linux -
i new linux scheme , using ubuntu linux operation on oracle vm virtualbox. have few enquiries using python , packages.
this operation set python installed 1 python bundle "pytopkapi". after have modified 1 sourcecode in original package, replace old code in installed bundle new one.
then typed,
help() help> pytopkapi and screen shows:
help on bundle pytopkapi: name pytopkapi file /usr/local/lib/python2.7/dist-packages/pytopkapi/__init__.py i assumed /usr/local/lib/python2.7/dist-packages/pytopkapi/ install directory , did found sourcecode replace. copied new sourcecode in replace old one. whole process went alright results, seems new code not used.
could tell me if right way replace sourcecode within installed python package? , if it's not, how can it?
update:
after seen comments, have deleted .pyc file using:
sudo find . -name "*.pyc" -exec rm -rf {} \; make sure have set work directory bundle folder before typed in code!!!
i got code https://docs.python.org/2/install/, remove pre-compiled python files under work directory.
then have re-installed bundle using:
sudo python setup.py install now if run original codes immediately, might not working, , '... module cannot found'. closed python reopen it. went alright.
hope can help.
python linux python-2.7 virtualbox packages
No comments:
Post a Comment