如何使用python库_如何在python中使用第三方“库”?

这篇博客指导用户如何使用pip来安装和导入Python库,例如python-dateutil。通过运行'pip install python-dateutil'命令,用户可以避免手动处理源文件和编译步骤。博客强调了pip的便利性,并建议读者在Windows环境中忘掉传统的编译过程,直接使用pip进行安装。
摘要由CSDN通过智能技术生成

I went ahead and downloaded it, but I

had problems when I tried to use it.

Apparently the download includes

source files, and I had absolutely no

idea how to use it in my “project” in

eclipse.

你应该在你的命令行类型中使用pip:

pip install python-dateutil

这个命令将为你做所有的事情,它将下载并安装库

自动.如果你没有pip,请参阅上面的文档,看看你应该如何安装它

Do I need to include the source files

directly with my files? Perhaps in a

subdirectory? How would I use it in my

code (how do I import them in my .py

file)?

如果您使用上面的pip不需要,您现在应该只在脚本中导入dateutil以使用它:

import dateutil

Do I need to “build” (make?) them and

reference them? How? How do you

“compile” something like that in

windows?

一切都是用pip完成的(魔法不是:))

Am I totally missing some important

point?

是的python很酷,简单而有趣,忘了make,make install …… python中的所有内容都很容易安装.

而对于G的爱…请使用pip(这是BDFL的订单).

希望这可以帮助:)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值