Python中文
首页
教程
问答
标签
搜索
登录
注册
VS代码无法识别pep8
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>要对Python使用linting,我配置了如下<code>VS Code</code>:</p> <pre><code>"python.linting.enabled": true, "python.linting.pylintEnabled": false, "python.linting.pep8Enabled": true, "python.linting.lintOnTextChange": true, "python.linting.lintOnSave": true </code></pre> <p>然后我打开了一个<code>*.py</code>文件,添加了不必要的空间并保存了它,然后我得到一个错误:<code>Linter pep8 is not installed</code>。</p> <p>但我已经安装了<code>pep8</code>。通过使用VS代码控制台,我可以找到<code>pep8</code>。</p> <h3>带VS代码控制台</h3> <pre><code>/usr/bin/python -m pip install pep8 loading ~/.zshrc_osx ironsand@macbook ~ % /usr/bin/python -m pip install pep8 /usr/bin/python: No module named pip ironsand@macbook ~ % which python /usr/bin/python ironsand@macbook ~ % which pep8 /usr/local/bin/pep8 ironsand@macbook ~ % pep8 --version 1.7.0 ironsand@macbook ~ % which python /usr/bin/python ironsand@macbook ~ % </code></pre> <p>也许我是通过使用<code>pip2</code>安装的<code>brew</code>来安装<code>pep8</code>。</p> <h3>带操作系统控制台(iTerm2)</h3> <pre><code>python --version Python 2.7.10 ironsand@macbook ~ % /usr/local/bin/pip2 install pep8 Collecting pep8 Using cached pep8-1.7.0-py2.py3-none-any.whl Installing collected packages: pep8 Successfully installed pep8-1.7.0 </code></pre> <p>我做错什么了?</p> <h3>插件</h3> <pre><code>MagicPython 1.0.12 Python 0.7.0 Python for VSCode 0.2.3 </code></pre>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>我知道这是一个老问题,但我也遇到了同样的问题,VS代码无法识别PEP8。卸载然后重新安装对我有好处。</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
python语法错误(如果不在Z中,则在X中表示s)
6 回答
Python语法错误(无效)概率
2 回答
python语法错误*带有可选参数的args
7 回答
python语法错误2.5版有什么办法解决吗?
4 回答
Python语法错误2.7.4
4 回答
python语法错误30/09/2013
7 回答
Python语法错误E001
2 回答
Python语法错误not()op
7 回答
python语法错误outpu
8 回答
Python语法错误print len()
1 回答
python语法错误w3
4 回答
Python语法错误不是caugh
9 回答
python语法错误及yt-packag的使用
9 回答
python语法错误可以查出来!!瓦里亚布
1 回答
Python语法错误可能是缩进?
3 回答
Python语法错误和缩进
8 回答
Python语法错误在while循环中生成随机numb
1 回答
Python语法错误在哪里?
1 回答
python语法错误在尝试导入包时,但仅在远程运行时
9 回答
Python语法错误在电子邮件地址提取脚本中
10 回答