简体   繁体   English

用户安装了python模块

[英]User installed python modules

On Linux, how do I see the list of all python modules that are installed by a specific user. 在Linux上,如何查看特定用户安装的所有python模块的列表。

Where does 在哪里

pip install --user install <module>

install? 安装?

Is there a way to identify modules installed by a specific user using tools other than pip except the ones that are individually downloaded which could be anywhere? 有没有办法识别特定用户使用pip以外的工具安装的模块,除了可以在任何地方单独下载的工具?

The --user switch, by default, installs into the site.USER_BASE location : --user开关,默认情况下,安装到site.USER_BASE位置

Path to the base directory for the user site-packages. 用户站点包的基本目录的路径。 Can be None if getuserbase() hasn't been called yet. 如果尚未调用getuserbase()则可getuserbase() None Default value is ~/.local for UNIX and Mac OS X non-framework builds, ~/Library/Python/XY for Mac framework builds, and %APPDATA%\\Python for Windows. 对于UNIX和Mac OS X非框架构建,默认值为~/.local对于Mac框架构建,默认值为~/Library/Python/XY ,对于Windows,默认值为%APPDATA%\\Python

You can override this by setting the PYTHONUSERBASE environment variable, as detailed in the User installs” section of the pip manual. 您可以通过设置PYTHONUSERBASE环境变量来覆盖它,详见用户安装“ pip手册部分

You should be able to see all your python modules (and versions) like this ( docs here ): 您应该能够看到所有这样的python模块(和版本)( 这里的文档 ):

C:\Users\joe>pip freeze
Cython==0.19.2
Flask==0.10.1
Jinja2==2.7.1
MDP==3.3
MarkupSafe==0.18
PIL==1.1.7
...

Looks like Mr. Pieters has answered your other question 看起来Pieters先生已经回答了你的另一个问题

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

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