Reputation: 15756
I am using Ubuntu 14.04
installed pylint with:
sudo apt-get install pylint
i downloaded eclipse luna and installed pydev over the marketplace. But instead of linting my code, my python runtime is linted.
My console output:
PyLint: Executing command line: /usr/bin/pylint /home/devnull/pyworkspace/soup/test1.py
PyLint: The stdout of the command line is:
PyLint: The stderr of the command line is: File "/usr/lib/python3.4/site.py", line 182
file=sys.stderr)
^
SyntaxError: invalid syntax
My config:
Any idea what I configured wrong ? If i run pylint from the terminal everything works fine.
Update my output from the terminal:
No config file found, using default configuration
************* Module test1
C: 14, 0: Line too long (104/80) (line-too-long)
C: 14, 0: Exactly one space required after comma
return "{0}_{1}.html".format(date.today().strftime('%y_%m_%d'), str(uuid.uuid4()).replace('-','_'))
^ (bad-whitespace)
C: 25, 0: Line too long (112/80) (line-too-long)
C: 37, 0: Exactly one space required after comma
with codecs.open(os.path.join(path,filename()),'w',encoding='utf8') as f:
^ (bad-whitespace)
C: 37, 0: Exactly one space required after comma
with codecs.open(os.path.join(path,filename()),'w',encoding='utf8') as f:
^ (bad-whitespace)
C: 37, 0: Exactly one space required after comma
with codecs.open(os.path.join(path,filename()),'w',encoding='utf8') as f:
^ (bad-whitespace)
C: 1, 0: Missing module docstring (missing-docstring)
F: 3, 0: Unable to import 'bs4' (import-error)
F: 10, 0: Unable to import 'selenium' (import-error)
F: 11, 0: Unable to import 'selenium.webdriver.common.keys' (import-error)
C: 13, 0: Missing function docstring (missing-docstring)
C: 16, 0: Invalid constant name "path" (invalid-name)
C: 21, 0: Invalid constant name "driver" (invalid-name)
C: 30, 0: Invalid constant name "content" (invalid-name)
C: 33, 0: Invalid constant name "soup" (invalid-name)
W: 53,-1: String statement has no effect (pointless-string-statement)
W: 11, 0: Unused import Keys (unused-import)
Report
======
24 statements analysed.
Raw metrics
-----------
+----------+-------+------+---------+-----------+
|type |number |% |previous |difference |
+==========+=======+======+=========+===========+
|code |35 |79.55 |35 |= |
+----------+-------+------+---------+-----------+
|docstring |0 |0.00 |0 |= |
+----------+-------+------+---------+-----------+
|comment |1 |2.27 |1 |= |
+----------+-------+------+---------+-----------+
|empty |8 |18.18 |8 |= |
+----------+-------+------+---------+-----------+
**other output omitted **
PyLint --version:
No config file found, using default configuration
pylint 1.1.0,
astroid 1.0.1, common 0.61.0
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2]
my runtime:
Upvotes: 2
Views: 908
Reputation: 2370
I just got the same problem. I have python 2.7 and python 3.4 Installed pylint using
apt-get install pylint
and I got the same error as you.
Then I instaled
apt-get install pylint3
and updated the location of the pylint executable to
/usr/bin/pylint3
and it worked.
When you install modules you will need to target your specific python major version number.
I had to do the same for numpy and scipy etc.
Upvotes: 1