简体   繁体   English

安装没有Internet访问的Python模块

[英]Installing Python modules without Internet access

I have recently started studying Python, using a combination of Automate the Boring Stuff by Al Sweigart and Python Programming, an Introduction Into Computer Science by John M. Zelle, if I want a deeper look. 我最近开始研究Python,结合使用Al Sweigart和Python编程 自动化无聊的东西 ,John M. Zelle的计算机科学入门 ,如果我想深入了解一下。 I intend to find some more complete books once I've worked through these. 一旦我完成了这些工作,我打算找一些更完整的书。

I have however stumbled into a problem. 然而我遇到了一个问题。 Automate the Boring Stuff explains how to add modules to python using the pip tool. 自动化无聊的东西解释了如何使用pip工具向python添加模块。

I however live in rural Tennessee, where they charge $150 per month for a 1.5 mbs DSL connection (can you tell I'm a bit salty?) 然而,我居住在田纳西州的乡村,他们每月收费150美元,用于1.5 mbs的DSL连接(你能告诉我有点咸吗?)

This means that my only Internet connection is the mobile data on my cellphone, and that only outside the house... 这意味着我唯一的互联网连接是手机上的移动数据,而且只在家门外...

Can anyone give me instructions directed towards a novice on how I might be able to download the modules using my phone, and after transferring them to the PC, what commands I should run to add them to python? 任何人都可以给我指示如何使用我的手机下载模块的新手,并将它们传输到PC后,我应该运行什么命令将它们添加到python? Any explanations of how and why it works that way is highly appreciated as well. 任何有关如何以及为何如此工作的解释也受到高度赞赏。 It is a learning experience, after all. 毕竟,这是一种学习经历。

Thanks for your help. 谢谢你的帮助。

Here's a summary of the above comment thread for anyone visiting this question. 以下是访问此问题的任何人的上述评论主题的摘要。

You can download the wheel files (.whl) or the archive files (.tar.gz) from pypi.org . 您可以从下载文件轮(.whl)或归档文件(.tar.gz)方式pypi.org

Once you have a wheel or an archive, you can run: 有了轮子或存档后,您可以运行:

pip install name_of_wheel.whl # installs a wheel named `name_of_wheel.whl`

or, to install from an archive: 或者,从存档安装:

pip install archive.tar.gz # installs an archive named `archive.tar.gz`

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

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