首页 > 其他分享 >pip你真的Get到了吗?

pip你真的Get到了吗?

时间:2024-03-13 10:59:27浏览次数:16  
标签:Get simple global pypi install pip 真的 com

作为一个电脑小白,在刚刚开始接触编程——python的时候,需要安装编程环境。常需借助pip命令进行一系列的操作。

1.查看pip版本命令:pip -V

pip -V

如上图,我的pip版本是22.3.

2.pip命令的更新:

python.exe -m pip install --upgrade pip

在我们安装某些包或者第三方库需要使用pip install ****(***为包名)命令安装时失败,并显示绿色提示更新pip命令。

这时候我们需要按照提示更新pip命令:python.exe -m pip install --upgrade pip

显示:Successfully installed pip即更新成功!!!

我们再次查看pip版本,可以看到已经是最新版本24.0:

3.pip使用或修改国内镜像源

相信大家在上面的使用过程中也感受到了,网速很开门!!!但是下载很慢,甚至失败。这是因为默认为国外网址去下载,所以会很慢,或者网络波动导致失败。我们可以使用国内网址去下载。。

①临时换源

(****为安装的包名或库名!!!)

清华源:

pip install **** -i https://pypi.tuna.tsinghua.edu.cn/simple

阿里源:

pip install **** -i https://mirrors.aliyun.com/pypi/simple/

腾讯源:

pip install **** -i http://mirrors.cloud.tencent.com/pypi/simple

豆瓣源:

pip install **** -i http://pypi.douban.com/simple/

②永久换源

清华源:

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

阿里源:

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

腾讯源:

pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple

豆瓣源:

pip config set global.index-url http://pypi.douban.com/simple/

③换回默认源

pip config unset global.index-url

感谢大家的阅读,点赞收藏不迷路!!!!!~

标签:Get,simple,global,pypi,install,pip,真的,com
From: https://blog.csdn.net/GSYL1105/article/details/136672240

相关文章

  • 你真的懂指针吗(1)
    在c语言中,我们需要创建变量(也就是向内存申请空间),为了得到变量的地址,我们需要用到&,也就是取地址操作符。我们通过&得到的地址是一个数值,这个数值有时候也需要存储起来,以便后期的使用。这时候就需要一个指针变量将地址值存储起来。一、解引用操作符 *我们来看下面这个代码:in......
  • SimpleUI [12/Mar/2024 19:32:11] "GET /admin/logout/ HTTP/1.1" 405 0 Method Not
    Django使用SimpleUI后,登出报错[12/Mar/202419:32:11]"GET/admin/logout/HTTP/1.1"4050MethodNotAllowed(GET):/admin/logout/MethodNotAllowed:/admin/logout/[12/Mar/202419:36:20]"GET/admin/logout/HTTP/1.1"4050原因升级到5.0后不......
  • Lucene轻量级搜索引擎,真的太强了!!!Solr 和 ES 都是基于它
    一、基础知识1、Lucene是什么Lucene是一个本地全文搜索引擎,Solr和ElasticSearch都是基于Lucene的封装Lucene适合那种轻量级的全文搜索,我就是服务器资源不够,如果上ES的话会很占用服务器资源,所有就选择了Lucene搜索引擎2、倒排索引原理全文搜索的原理是使用......
  • error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft
       Defaultingtouserinstallationbecausenormalsite-packagesisnotwriteableCollectingPyQt5-sipUsingcachedPyQt5_sip-12.13.0.tar.gz(123kB)Installingbuilddependencies...doneGettingrequirementstobuildwheel...donePreparing......
  • CodeCombat Teacher Getting Started Guide
    Skiptomaincontent Submitarequest Signin CodeCombat CodeCombatforEducators GettingStartedArticlesinthissectionCodeCombatTeacherGettingStartedGuideWhichprogramminglanguageshouldIchooseformystudentsinCodeCo......
  • 异步编程真的让程序更快了吗?
    同步和异步调用的本质区别是什么?引言现在异步编程真的是越来越普遍了,从前端的Promise到后端的Channel、Future、Task,异步编程正变得越来越流行。很多同学也玩得很溜了,满世界的异步调用,让程序的效率和用户体验都大大提升。不过,当谈到为什么要使用异步编程,以及它背后的工作原理时......
  • Java Http Get Post 请求工具类
    importcom.alibaba.fastjson.JSONObject;importorg.apache.http.NameValuePair;importorg.apache.http.client.config.RequestConfig;importorg.apache.http.client.entity.UrlEncodedFormEntity;importorg.apache.http.client.methods.CloseableHttpResponse;importorg......
  • There is no getter for property named 'category_id' in 'class com.sky.entity.Dis
    我在前后端联调时,sql语句的set没有书写正确,程序无法getter到Dish实体类的categoryId属性,导致后端报错dish实体类:错误格式:正确格式:......
  • 【软件安装】pytorch安装(windows10,pip版)
    前提必须先安装cuda与cudnn,教程:cuda与cudnn部署安装同时确认你的CUDA版本,nvidia-smi:确认版本是12.4,继续往下走安装pytorch前往官网,并且往下滑动,直到你看见INSTALLPYTORCH:PyTorch看左下角的PreviousversionsofPyTorch,点进去:这里显示最新的是v2.2.0版本,咱就下这个,按设......
  • Attribute GetCustomAttribute via method info of type
    [AttributeUsage(AttributeTargets.Method)]publicsealedclassTestAttribute:Attribute{publicintRepetitions;publicstringFailureMessage;publicTestAttribute():this(1){}publicTestAttribute(intrepetitions){......