简体   繁体   English

在哪里可以找到枕头模块的位置?

[英]Where can i find pillow module location?

I am doing programming assignment, my program contains images so I used pillow module. 我正在做程序分配,我的程序包含图像,所以我使用了枕头模块。 In the end, I must send all modules file to my lecturer so that he could run my program without installing anything, but I can't find my pillow module location. 最后,我必须将所有模块文件发送给我的讲师,以便他可以在不安装任何内容的情况下运行我的程序,但是我找不到我的枕头模块位置。 Can somebody help me? 有人可以帮我吗?

pip show pillow

应该返回位置

Although pip is the right thing to do it, you can use python interpreter directly as an alternative (this works for modules that were not installed by pip ), which would output the module entry-point's location. 尽管pip是正确的做法,但是您可以直接使用python解释器作为替代(这适用于pip尚未安装的模块),它将输出模块入口点的位置。 As a note, the module must be importable . 注意,模块必须是importable

Here's an example for numpy (as I don't have pillow installed): 这是numpy的示例(因为我没有安装枕头 ):

 (py35x64_test) e:\\Work\\Dev\\StackOverflow\\q053170620>"e:\\Work\\Dev\\VEnvs\\py35x64_test\\Scripts\\python.exe" Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy >>> numpy <module 'numpy' from 'e:\\\\Work\\\\Dev\\\\VEnvs\\\\py35x64_test\\\\lib\\\\site-packages\\\\numpy\\\\__init__.py'> 

Or the one line corespondent: 或单行赞助人:

 (py35x64_test) e:\\Work\\Dev\\StackOverflow\\q053170620>"e:\\Work\\Dev\\VEnvs\\py35x64_test\\Scripts\\python.exe" -c "import numpy; print(numpy)" <module 'numpy' from 'e:\\\\Work\\\\Dev\\\\VEnvs\\\\py35x64_test\\\\lib\\\\site-packages\\\\numpy\\\\__init__.py'> 

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

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