pip After some bags :
pip Actually, it's just python A module of , Also with .py It's a suffix python The library files . And is located in "*\python\Lib\site_packges" Under the document , Here is the folder where the third-party library is located .Scripts Medium pip.exe The function of is to call pip, It is convenient for us to use directly on the command line pip library .
When the user enters... On the command line pip after , function pip.exe Executable file , It will bring “*\python\python.exe” And “*\python\Scripts\pip.exe” Connect and execute on the command line .
pip.exe Will be looking for Lib\site_packages Medium pip In the library __main__.py File and finally return its path information , So it's equivalent to “*\python\python.exe” + “* \__ main__.py”, In fact, you can also run directly in this way pip, It's just a little bit of trouble .
Of course, you can also enter "*\python.exe" + " *\pip.exe " call pip modular , It's all the same .
python Built-in tools pip.exe,
be located python Installation directory script subdirectories D:\python\Scripts
Command line input :pip.exe install ***
Main reference :pip The principle of calling from the command line
Installation is not complete , Only by understanding the virtual environment can we really master Python Environmental Science
essays —— Self made python compiler ——pip.exe Copy modification of https://blog.csdn.net/Cc6661366613/article/details/124007603
Hanging and exploding the sky ,linux On python Virtual environment migration method https://www.jianshu.com/p/ef54a30eb936
vscode Use in venv
besides , It can also be done through "python -m pip" call pip, This method of execution is python.exe Features included ,-m It means “ call moudule”, You can also call other modules in this way ( The premise is that the module also supports independent execution ), It will directly find and mobilize site_packages Inside pip modular , And it doesn't use pip.exe.
So look at it like this , call pip There are many ways to use the library , In fact, the essence is to pip In the library __main__.py File entry python The interpreter performs .
Be careful : If changed python Name of the folder , So even if the system environment variables are adjusted accordingly , You can no longer enter directly pip call pip modular . because pip.exe Does not automatically adjust the path of the call itself
And still use “*\python\python.exe” This original python Interpreter path . So don't change it easily python Name of the folder .
python Data visualization seab
This is Xing buidi