2
我使用Ubuntu 14.04pylint的在Eclpise,停止掉毛Python運行
安裝pylint的有:
sudo apt-get install pylint
我下載的是Eclipse紅月並安裝PyDev的在市場上。但是我的代碼並沒有寫入,我的python運行時被刪除了。
我的控制檯輸出:
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
我的配置:
任何想法,我配置錯了嗎? 如果我從終端運行pylint一切正常。
更新我從端子輸出:
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]
我運行:
所以,如果你運行「在/ usr/bin中/ pylint的/home/devnull/pyworkspace/soup/test1.py」它按預期工作?你期待使用python 3嗎?你有安裝Python 2嗎? Eclipse配置了什麼版本的Python? –
是的我想要皮棉蟒蛇3.我有python 2也安裝了,我在eclipse中使用python 3。我添加了輸出和我的輸出從pylint - 版本。也許我的pylint版本是舊的?可能我不應該在apt-get上安裝pylint並使用pip? – svenhornberg