python - Override module in virtualenv with local directory -


i'm rather new python , running issue can't past. have module depends on module b. normally, downloads b , stores rest of eggs in virtualenv site-packages. now, have local version of b want use instead of downloaded version of b no matter seem do, still uses b in site packages , not 1 specify in pythonpath.

i know local b set right because can use fine if add pythonpath , i'm not using virtualenv.

if open ipython local b prepended pythonpath, see sys.path lists site-packages version first, then directory in pythonpath. if hacky reverse order of sys.path , attempt load b, still uses b site-packages. way i've found around create sym link b in site-packages local b , remove *.pyc files in local b. there has better way this... awesome. thank you!

i'm not sure matter reference i'm using following versions of stuff:

  • virtualenv 12.1.1
  • python 2.7
  • modules , b internal libraries @ company
  • ubuntu 12.04.5 lts

if you're working on pair of related projects 1 depends on other, can uninstall "remote" version , use pip install -e install local copy in editable mode.

this let dependent project see it, , automatically see changes upstream project without needing work.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -