How to make editra use virtualenv python settings/libraries

Discuss any topics about the editor here

How to make editra use virtualenv python settings/libraries

Postby gopar » Mon Dec 02, 2013 7:50 am

The title pretty much explains what my question is about. I am using ubuntu 12.04 and I installed editra. It works great but I have installed virtualenv and also installed some python libraries there but I can't find a way where I can make the editra PYSHELL recognize the libraries installed within the python virtualenv. I tried making a symbolic to where editra is installed since I had a similar problem with not being able to use WxPython in the virtualenv. When I created the symbolic link all my problems relating to wxpython went away but sadly it didn't work when I tried it for editra. Any information to how I might be able to fix this problem will be appreciated. Also I am not sure where I should of posted this since this is not a "Bug" nor a feature request.

Thank You,
Daniel G.


EDIT: For some reason I just installed the "launch" plug in and then importing of custom libraries from within the virtualenv work perfectly. Not sure what exactly happen.
gopar
Limited User
 
Posts: 3
Joined: Thu Aug 08, 2013 5:56 am

Re: How to make editra use virtualenv python settings/librar

Postby cody » Wed Dec 04, 2013 6:44 pm

Sorry I don't have much experience with virtualenv.

The differences between PyShell and Launch are that PyShell runs 'in process' with Editra so it is using the same instance of python that editra is running in. Whereas Launch will launch a separate python instance based on what it was configured to launch.

So my guess is that you are maybe running Editra on one installation of Python and have launch configured to use another installed version?


Cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: How to make editra use virtualenv python settings/librar

Postby gopar » Sun Dec 15, 2013 3:34 am

I installed Editra inside the virtualEnv so that it will use the python libraries within that environment. All instances of Python should be the one installed in the virtual folder. My guess would be that it might explicitly look for the systems python, ignoring the virtual one. Not quite sure, but thank you for your response.
gopar
Limited User
 
Posts: 3
Joined: Thu Aug 08, 2013 5:56 am

Re: How to make editra use virtualenv python settings/librar

Postby cody » Mon Dec 16, 2013 6:09 pm

Not sure without debugging. As mentioned the PyShell plugin runs in process with Editra using the same instance of python Editra is running ontop of, so the python path and everything in the environment should be the same as what Editra is running with.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron