我对新手的问题深表歉意。我试图正确地下载和集成Python3.7安装和VSCode,并使用flake8作为linter。我想为Blender开发定制脚本做准备。我在Win10 x64上。
WARNING: The script pyflakes.exe is installed in 'C:\Users\futur\AppData\Roaming\Python\Python37\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script pycodestyle.exe is installed in 'C:\Users\futur\AppData\Roaming\Python\Python37\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script flake8.exe is installed in 'C:\Users\futur\AppData\Roaming\Python\Python37\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed flake8-3.8.3 importlib-metadata-1.7.0 mccabe-0.6.1 pycodestyle-2.6.0 pyflakes-2.2.0 zipp-3.1.0
我检查了我的环境变量,如下所示:

我不明白为什么在%APPDATA%中有两个Python目录。有:
C:\Users\futur\AppData\Local\Programs\Python\Python37\Scripts
以及:
C:\Users\futur\AppData\Roaming\Python\Python37\Scripts
flake8安装在漫游文件夹中,而我的主要安装在
C:\Users\futur\AppData\Local\Programs\Python\Python37
最后,以下是我的问题:
C:\Users\futur\AppData\Roaming\Python\Python37\Scripts添加到用户路径环境变量,还是添加到系统路径环境变量?任何关于如何正确设置一切的指导都将是巨大的帮助和极大的感谢。
编辑1
非常感谢所有的答案。我想强调的是,我希望在不安装Anaconda的情况下解决这个问题。
编辑2
我在这里取得了一些进展。我没有通过VSCode安装VSCode,我只是运行了python -m pip install flake8,现在一切看起来都很好。
发布于 2020-06-30 10:24:56
根据您的描述,我成功地安装了flake8。
我认为flake8的安装路径有问题。
它的默认路径将不在漫游中。默认路径只有: C:\Users\futur\AppData\Local\Programs\Python\Python37\Scripts和C:\Users\futur\AppData\Local\Programs\Python\Python37;
默认情况是本地的,它通常存储可执行程序和其他大容量文件;
建议您再次安装python并检查pip的版本和位置(使用"pip“)。
发布于 2020-06-30 05:30:34
您可以使用环境工具来解决所有这些问题。
下载蟒蛇并创建一个带有您预期的python版本的环境,并在您的conda中安装flake8。VScode可以很好地处理anaconda。
发布于 2020-06-30 05:34:20
下载Anaconda,它将自动解决您所面临的与环境设置相关的所有问题。
https://stackoverflow.com/questions/62650287
复制相似问题