Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在Windows上,什么';不同脚本文件夹之间的区别是什么?_Python_Windows_Python 2.7_Python 3.x_Pip - Fatal编程技术网

Python 在Windows上,什么';不同脚本文件夹之间的区别是什么?

Python 在Windows上,什么';不同脚本文件夹之间的区别是什么?,python,windows,python-2.7,python-3.x,pip,Python,Windows,Python 2.7,Python 3.x,Pip,在Windows安装的Python上,以下各项之间的区别是什么 “PythonInstallFolder”\Scripts\ %APPDATA%\Python\Scripts\ %APPDATA%\Python\Python36\Scripts\ 还有,所有人都应该走我的路吗 我安装了多个版本的python Python27->C:\Users\nahawk\Python\Python27\ Python36->C:\Users\nahawk\Python\Python36\ 输出 C:

在Windows安装的Python上,以下各项之间的区别是什么

  • “PythonInstallFolder”\Scripts\
  • %APPDATA%\Python\Scripts\
  • %APPDATA%\Python\Python36\Scripts\
还有,所有人都应该走我的路吗

我安装了多个版本的python

  • Python27->
    C:\Users\nahawk\Python\Python27\
  • Python36->
    C:\Users\nahawk\Python\Python36\
输出

C:\>where pip
C:\Users\nahawk\Python\Python27\Scripts\pip.exe
C:\Users\nahawk\Python\Python36\Scripts\pip.exe

C:\>where pip2
C:\Users\nahawk\Python\Python27\Scripts\pip2.exe

C:\>where pip3
C:\Users\nahawk\Python\Python36\Scripts\pip3.exe

C:\>where cookiecutter
C:\Users\nahawk\AppData\Roaming\Python\Scripts\cookiecutter.exe

C:\>where futurize
C:\Users\nahawk\AppData\Roaming\Python\Scripts\futurize.exe
C:\Users\nahawk\AppData\Roaming\Python\Python36\Scripts\futurize.exe

通常,脚本将安装在安装或虚拟环境的“脚本”中<代码>%APPDATA%\Python由--user安装使用。一般来说,在
%APPDATA%
中安装应用程序实际上是个坏主意。有人没有思考的能力。这是用户的漫游配置文件。如果用户下载的配置文件中包含类似于SciPy和matplotlib的软件包,那么这会导致网络拥塞。它应该使用
%LocalAppData%\Python
。至于对3.6版的
%APPDATA%\Python\Scripts
的更改,这源于对在Windows上使用版本化脚本和可执行文件名的蔑视。因此,将所有版本的所有内容放在一个“脚本”目录中是一个不可行的混乱。现在它使用一个版本化的目录。这将
路径管理的负担推到了用户身上。因此,我建议完全避免——用户安装,并尽量减少在主Python安装中安装的内容,以使用虚拟环境。创建运行
cmd/k path\to\activate.bat的shell链接,以轻松启动环境。