简体   繁体   English

更改pip和pip3的路径

[英]Change path of pip and pip3

I want to create a user path to install packages installed by pip or pip3 for python 3.7.2, for that, I noticed that C:\\Users\\VVK\\AppData\\Roaming\\Python\\Python37\\site-packages by py -m site --user-site and,我想创建一个用户路径来安装由pippip3为 python 3.7.2 安装的软件包,为此,我注意到C:\\Users\\VVK\\AppData\\Roaming\\Python\\Python37\\site-packages by py -m site --user-site和,

I wish to update it by C:\\Users\\VVK\\AppData\\Roaming\\Python37\\Scripts , How is this possible?我希望通过C:\\Users\\VVK\\AppData\\Roaming\\Python37\\Scripts更新它,这怎么可能?

I am using Microsoft Windows 10 64-bit.我使用的是 Microsoft Windows 10 64 位。

You can use the --target option in when install. 您可以在安装时使用--target选项。

$ pip install isort --target C:\\Users\\VVK\\AppData\\Roaming\\Python37\\Scripts

Will install the isort package and your dependencies in the folder. 将在文件夹中安装isort软件包和您的依赖项。

Python37\\site-packages is used to install libraries while Python37\\Scripts is used to install programs . Python37\\site-packages用于安装库,Python37\\Scripts用于安装程序 The latter should not be used for package installation. 后者不应用于软件包安装。 Packages when installed should install their programs (executable scripts) into Python37\\Scripts themselves. 软件包在安装时应将其程序(可执行脚本)安装到Python37\\Scripts自身中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM