Re: Winpyton 2.7.4.1 Spyder and Pylint - pylint does not work?

325 views
Skip to first unread message

Pierre Raybaut

unread,
May 9, 2013, 1:08:37 PM5/9/13
to winp...@googlegroups.com
You're right, pylint is broken in the latest release... apparently it needs 'colorama' [1]. Weird. Have to figure it out.

In the meantime, you may fix this by running this command under WinPython command prompt:
pip install colorama


[1] For the record, here is the traceback:

D:\winpython\basedir27\build\winpython-2.7.4.amd64\python-2.7.4.amd64>pylint
Traceback (most recent call last):
  File "D:\winpython\basedir27\build\winpython-2.7.4.amd64\python-2.7.4.amd64\Scripts\pylint-script.py", line 5, in <mod
ule>
    from pkg_resources import load_entry_point
  File "D:\winpython\basedir27\build\winpython-2.7.4.amd64\python-2.7.4.amd64\lib\site-packages\pkg_resources.py", line
2805, in <module>
    working_set.require(__requires__)
  File "D:\winpython\basedir27\build\winpython-2.7.4.amd64\python-2.7.4.amd64\lib\site-packages\pkg_resources.py", line
696, in require
    needed = self.resolve(parse_requirements(requirements))
  File "D:\winpython\basedir27\build\winpython-2.7.4.amd64\python-2.7.4.amd64\lib\site-packages\pkg_resources.py", line
594, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: colorama


2013/5/9 <cscottb...@gmail.com>
I just installed the latest WinPython and I cannot get pylint to run on files.  I point to the file in spyder but nothing happens after the icon goes from green to red and back.  Does something have to be change in the environment to get pylint to run with winpython?  By the way, it works with a Python(x,y) installation.

Thanks for any advice.

Scott

--
You received this message because you are subscribed to the Google Groups "WinPython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to winpython+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Pierre Raybaut

unread,
May 9, 2013, 1:59:11 PM5/9/13
to winp...@googlegroups.com
Of course, you may also install colorama using WinPython Control Panel:
  * drag/drop in WinPython Control Panel window

This will be fixed in next release.

-Pierre



2013/5/9 Pierre Raybaut <pierre....@gmail.com>

François Coulombeau

unread,
Jul 17, 2013, 8:41:47 AM7/17/13
to winp...@googlegroups.com
Bonjour,

Comme vous le savez peut-être Python entre au programme des classes préparatoires aux Grandes Ecoles. On peut donc s'attendre à ce qu'un certain nombre de nouveaux utilisateurs, éventuellement contributeurs, s'agrègent à la masse imposante de ceux qui utilisent déjà Python !

En ce qui me concerne, j'en suis aux premiers pas, en train d'écrire mon cours et d'essayer de m'y retrouver dans le foisonnement Python.

Pour notre lycée, on a choisi d'installer WinPython 3.3.2. J'ai fait de même sur mon ordinateur.
J'essaye d'installer Pylint sachant que le mieux est d'apprendre aux élèves dès le départ les "bonnes habitudes à prendre" dans l'écriture d'un script.

Mais je me heurte à un problème.
1) J'ai installé WinPyhton 3.3.2, ajouté [WinPythonDir]\python-3.3.2.amd64\Scripts dans la variable d'environnement path
2) j'ai installé Pylint depuis une fenêtre de commande du même répertoire par "pip install pylint"
Jusque-là pas de problème. Mais lorsque j'exécute Pylint.bat sur un script quelconque voici ce que j'obtiens :


Traceback (most recent call last):
  File "C:\WinPython\python-3.3.2.amd64\Scripts\pylint-script.py", line 5, in <module>
    from pkg_resources import load_entry_point
  File "C:\WinPython\python-3.3.2.amd64\lib\site-packages\pkg_resources.py", line 2851, in <module>
    working_set.require(__requires__)
  File "C:\WinPython\python-3.3.2.amd64\lib\site-packages\pkg_resources.py", line 696, in require
    needed = self.resolve(parse_requirements(requirements))
  File "C:\WinPython\python-3.3.2.amd64\lib\site-packages\pkg_resources.py", line 594, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: logilab-astng>=0.24.3

3) j'ai donc aussi installé logilab-astng de la même manière : "pip install logilab-astng"

Mais j'ai à nouveau la même erreur (je recopie pas le traceback, c'est le même).

Une suggestion ?

F.Coulombeau
PS :
* la suggestion pourrait être de la forme choisissez plutôt telle distrib pour votre lycée ;-) - on souhaite travailler directement sous 3.x
* j'aurais pu écrire le message en anglais, j'ai choisi le français parce que M.Raybaut est français mais je peux à l'avenir intervenir uniquement en anglais (voire traduire ce message) si cela fait partie de la politique de ce forum.

Pierre Raybaut

unread,
Jul 17, 2013, 3:06:15 PM7/17/13
to winp...@googlegroups.com
Hi,
 
This discussion group's Policy is indeed to post in English, so that everyone can benefit from the discussion.
 
Your main question would be "how to install pylint in WinPython 3.3.x?":
AFAIK, pylint is not compatible with Python 3 (otherwise I would have included it in WinPython 3.3 as it's already part of WinPython 2.7 package index) but I may be wrong as a quick Google search on "pylint python 3" does not give a straight answer to this question... I'll have to do some tests.
 
AFAIK, there is no other Python 3.3 distribution for Windows including pylint.
 
Cheers,
-Pierre

François Coulombeau

unread,
Jul 17, 2013, 5:49:52 PM7/17/13
to winp...@googlegroups.com
Thanks for the quick answer. I keep on looking for a solution on my own and take you informed if I find something worthy.

Cheers,
F.Coulombeau
Reply all
Reply to author
Forward
0 new messages