简体   繁体   English

在python模块安装过程中会发生什么? 我可以将模块源复制到site-packages吗?

[英]What happens during a python module install? Can I just copy the module source to site-packages?

I'm having trouble installing M2Crypto on my shared webhost account with pip. 我在使用pip在我的共享虚拟主机帐户上安装M2Crypto时遇到问题。 Can I just copy the module's source into site-packages, or does pip do something extra? 我可以将模块的源代码复制到site-packages中,还是pip做额外的事情?

I have wondered the same thing in the past. 我曾经想过同样的事情。 However, I've had no problem installing packages "manually" by downloading them to my desktop, expanding them, then copying the appropriate objects to a sub-folder in my /extras directory (mine is a Django system). 但是,通过将软件包下载到我的桌​​面,扩展它们,然后将相应的对象复制到my / extras目录中的子文件夹(我的是Django系统),“手动”安装软件包没有问题。 Be sure there is an init .py file in there, and I always ensure it will be added to my svn source control. 确保有一个init .py文件,我总是确保它将被添加到我的svn源代码控制中。

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

相关问题 使用setuptools将模块安装到站点包 - Install module to site-packages with setuptools Python:我无法导入模块,即使它位于site-packages中 - Python: I can't import a module even though it's in site-packages 'dist-packages'与'site-packages'中的Python模块 - Python module in 'dist-packages' vs. 'site-packages' Centos 7 - 没有名为 yum 的模块 - 意外删除了 Python 站点包 - Centos 7 - No module named yum - Accidentally removed Python site-packages Python Docx 模块不在站点包文件夹内 - Python Docx Module Is Not Inside The Site-Packages Folder 如何在“ site-packages”中安装python包? - how to install python packages in “site-packages”? Python 模块已安装,并且在正确的站点包中,但仍未找到。 知道我该如何解决这个问题吗? - Python module is installed, and in correct site-packages, but is still not found. Any idea how I could fix this? python中的site-packages是什么,如果你不是root用户,你可以安装/使用它们吗? - What are site-packages in python and can you install/use them if you aren't root? 如何导入站点包中安装的模块 - How to import a module installed in site-packages 如何将文件从Python程序包(站点程序包)复制到目录? - How can I copy files from a Python package (site-packages) to a directory?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM