Pylons PyDev Issues

24 views
Skip to first unread message

Tim

unread,
Oct 11, 2010, 12:47:33 AM10/11/10
to pylons-discuss
Hello,

Does anyone here use PyDev with Pylons? Or know of a good setup
guide for it? I'm running into some issues with it, mainly in that I
receive a number of Unresolved Import errors even though my
interpreter seems to be setup correctly. In fact, I'm oddly mostly
having problems with it not resolving core python libraries, such as
logging and inspect.

Thanks!
Tim

Soj

unread,
Oct 14, 2010, 11:11:40 AM10/14/10
to pylons-discuss
Hello Tim,

Since I was planning to start my new project in pylons, I was trying
to find a good IDE and tried PyDev only to run into problems you
explained. There seems to be some inherent/mysterious problems with
'pydev + pylons' setup. (http://stackoverflow.com/questions/540538/
pydev-and-pylons-inside-virtual-environment-auto-completion-wont-work)

After some googling, got a hook on 'Spyderlib', its a really amazing
IDE.

Here are the steps to if you want to try.

On Ubuntu:-

1) http://code.google.com/p/spyderlib/wiki/Installation

2) sudo apt-get install python-qt4
3) sudo apt-get install python-qscintilla2
4) sudo apt-get install pyflakes
5) sudo apt-get install python-rope

6) Download "spyder-2.0.0beta5.tar.gz" from http://code.google.com/p/spyderlib/downloads/list

7) unzip/untar
8) python setup.py install
9) chmod 777 *
10) ./spyder

------------------------------------
To create Pylons project
(work around, but its kinda perfect)
------------------------------------

1) File -> 'New project' and create one
2) Go to this new directory in command line and use 'paster create -t
pylons <project name>
3) Basically you are creating a pylons project inside a spider
project.
4) Tools -> PYTHONPATH manager
5) Add all the pylons extensions egg path from your virtualenv - if
you have any - (Beaker, decorator, FormEncode, Pylons, Mako,
PasteScript, Routes, WebError etc...)
Eg:- <homedir>virtualenv/lib/python2.6/site-packages/Pylons-1.0-
py2.6.egg

------------------
Few customizations
------------------
1) Tools -> preferences -> Editor -> Code Introspection/Analysis
2) Check everything.
3) View -> Select run toolbar

Its still in beta and under very active development.

Explore and enjoy!!!
-soj

Vince Spicer

unread,
Oct 14, 2010, 1:03:56 PM10/14/10
to pylons-...@googlegroups.com
Tim,

I have used been using pydev with pylons and TG for some time, and it works very well.  I create a virtualenv for my project and then setup the
python interpreter to use the python executable in that env/bin directory.  Should fix importing issues.

Vince

--
Vince Spicer
Lead Developer - MCE Computing

-- 
Sent from Ubuntu

Soj

unread,
Oct 14, 2010, 8:50:43 PM10/14/10
to pylons-discuss
Just figured that, you can use the same project folder you created
with spyder for Paster command.
so it won't look like pylons application inside a spyder project.

1) create a new project <newapp> in Spyder
2) paster create -t pylons <newapp>




On Oct 14, 11:11 pm, Soj <soji...@gmail.com> wrote:
> Hello Tim,
>
> Since I was planning to start my new project in pylons, I was trying
> to find a good IDE and tried PyDev only to run into problems you
> explained. There seems to be some inherent/mysterious problems with
> 'pydev + pylons' setup. (http://stackoverflow.com/questions/540538/
> pydev-and-pylons-inside-virtual-environment-auto-completion-wont-work)
>
> After some googling, got a hook on 'Spyderlib', its a really amazing
> IDE.
>
> Here are the steps to if you want to try.
>
> On Ubuntu:-
>
> 1)http://code.google.com/p/spyderlib/wiki/Installation
>
> 2) sudo apt-get install python-qt4
> 3) sudo apt-get install python-qscintilla2
> 4) sudo apt-get install pyflakes
> 5) sudo apt-get install python-rope
>
> 6) Download "spyder-2.0.0beta5.tar.gz" fromhttp://code.google.com/p/spyderlib/downloads/list
Reply all
Reply to author
Forward
0 new messages