如何在python中添加库_如何在Python(3.5.1)中添加/使用库

I've recently been playing around with python and have now expanded into doing stuff like scraping through websites and other cool stuff and I need to import new libraries for these things like lxml, pandas, urllib2 and such. So I have Python 3.5.1 installed and is also using Wing IDE. I (think) also managed to install pip using this tutorial, but then got lost after the

Run python get-pip.py

part.

So how would I go about installing those libraries to try new projects? Thanks!

解决方案

if u have or you can create a file requirements.txt which contains the libraries that you want to install for ex:

numpy==1.14.2

Pillow==5.1.0

You gonna situate in your folder which contains that requirements.txt in my case the path to my project is

C:\Users\LE\Desktop\Projet2_Sig_Exo3\exo 3\k-means

now just type

python -m pip install -r ./requirements.txt

and all the libararies that you want gonna install

C:\Users\LE\Desktop\Projet2_Sig_Exo3\exo 3\k-means>python -m pip install -r ./requirements.txt

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值