Re: TaDAAA!!!!

Robin Dunn <[email protected]>
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
Eric Fahlgren wrote:
> Yes, I do that on my (windows) development machine.  The trick is to
> delete (or rename) the installation info that 3.0 puts in
> site-packages before you install 4.0, or pip will remove the 3.0
> installation.
>
> > cd python/lib/site-packages
> > pip install ...3.0...
> > rm wxPython-3.0.2.0.dist-info
> > pip install ...4.0...
> > mkdir wxPhoenix
> > mv wx wxPhoenix
>
> Now we have two parallel installations in site-packages:
>
> lib/site-packages/
>    wx-3.0-msw ("msw" because this is windows, your's will be different
> on Ubuntu)
>       wx
>    wxPhoenix
>       wx
>
> I then hack up site-packages/wx.pth so it looks like this:
>
> >>> import site ; sp = site.getsitepackages()[-1]
> >>> import os   ; cwd = os.getcwd()
> >>> import sys  ; sys.path.append(sp+os.sep+ ("wxPhoenix" if
> "wxUpdate" in cwd else "wx-3.0-msw"))
>
> So in my "wxUpdate" workspace, it automatically switches to wxPhoenix
> and "import wx" gets 4.0 instead of 3.0.
>
>

Much easier IMO is to use virtual environments for any project that will
be using Phoenix. Then pip takes care of everything for you and you do
not have to perform surgery on your main Python installs. 


-- 
Robin Dunn
Software Craftsman
http://wxPython.org

-- 
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.