Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: PyChecker under python's virtualenv

Reply
Thread Tools

Re: PyChecker under python's virtualenv

 
 
Diez B. Roggisch
Guest
Posts: n/a
 
      02-03-2010
Am 03.02.10 22:46, schrieb soltys:
> Hi Everybody,
> I've been doing some test on pythons' virtualenv and recently I've
> decided to run PyChecker. But I'm having some difficulties with importing
> modules available only on virtualenv by pychecker. As if it was
> trying to use systemwide python.
> I've googled about it, and found nothing in this area.
> I installed pychecker using python setup.py install
> from virtualenv. I looked at pychecker script - it uses correct python.


I doubt that it uses the "correct python", because then you wouldn't
have the problems you have.

I don't use pychecker, but pylint. And there, the system-wide command
uses the system's python - which of course doesn't know anything about
virtualenv.

There are two solutions to this problem:

- install py(lint|checker) into your virtualenv.
- write a wrapper-script that invokes py(lint|checker) with an adapted
PYTHONPATH environtment variable, based on the venv's sys.path. I do
that for my epylint-wrapper for emacs. Works flawlessly.


Diez
 
Reply With Quote
 
 
 
 
Steve Holden
Guest
Posts: n/a
 
      02-04-2010
Diez B. Roggisch wrote:
> Am 03.02.10 22:46, schrieb soltys:
>> Hi Everybody,
>> I've been doing some test on pythons' virtualenv and recently I've
>> decided to run PyChecker. But I'm having some difficulties with importing
>> modules available only on virtualenv by pychecker. As if it was
>> trying to use systemwide python.
>> I've googled about it, and found nothing in this area.
>> I installed pychecker using python setup.py install
>> from virtualenv. I looked at pychecker script - it uses correct python.

>
> I doubt that it uses the "correct python", because then you wouldn't
> have the problems you have.
>
> I don't use pychecker, but pylint. And there, the system-wide command
> uses the system's python - which of course doesn't know anything about
> virtualenv.
>
> There are two solutions to this problem:
>
> - install py(lint|checker) into your virtualenv.


See the OP's original assertion:

>> I installed pychecker using python setup.py install
>> from virtualenv. I looked at pychecker script - it uses correct python.


Isn't that "installing into his virtualenv"?

regards
Steve

> - write a wrapper-script that invokes py(lint|checker) with an adapted
> PYTHONPATH environtment variable, based on the venv's sys.path. I do
> that for my epylint-wrapper for emacs. Works flawlessly.
>
>
> Diez



--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/

 
Reply With Quote
 
 
 
 
Diez B. Roggisch
Guest
Posts: n/a
 
      02-04-2010
Am 04.02.10 01:52, schrieb Steve Holden:
> Diez B. Roggisch wrote:
>> Am 03.02.10 22:46, schrieb soltys:
>>> Hi Everybody,
>>> I've been doing some test on pythons' virtualenv and recently I've
>>> decided to run PyChecker. But I'm having some difficulties with importing
>>> modules available only on virtualenv by pychecker. As if it was
>>> trying to use systemwide python.
>>> I've googled about it, and found nothing in this area.
>>> I installed pychecker using python setup.py install
>>> from virtualenv. I looked at pychecker script - it uses correct python.

>>
>> I doubt that it uses the "correct python", because then you wouldn't
>> have the problems you have.
>>
>> I don't use pychecker, but pylint. And there, the system-wide command
>> uses the system's python - which of course doesn't know anything about
>> virtualenv.
>>
>> There are two solutions to this problem:
>>
>> - install py(lint|checker) into your virtualenv.

>
> See the OP's original assertion:
>
>>> I installed pychecker using python setup.py install
>>> from virtualenv. I looked at pychecker script - it uses correct python.

>
> Isn't that "installing into his virtualenv"?


You are right, it reads like that. I should have read it better.

All I can say is that even a system-wide pylint with my recipe above
gives me no troubles.

Diez
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ipython installed in virtualenv seems not to use virtualenv Gelonida N Python 4 08-11-2011 11:06 AM
Problems running VirtualEnv under Windows. ashconnor Python 1 07-12-2010 06:13 PM
virtualenv under Win7: easy_install fails in virtual environments Guillermo Python 1 10-26-2009 07:21 PM
virtualpython / workingenv / virtualenv ... shouldn't this be part of python Damjan Python 5 01-15-2008 08:57 AM
Pychecker under Windows Kylotan Python 10 12-03-2003 07:36 PM



Advertisments