PyCharm更换pip源为国内源、模块安装、PyCharm依赖包导入导出教程 |
您所在的位置:网站首页 › 安装包修改器 › PyCharm更换pip源为国内源、模块安装、PyCharm依赖包导入导出教程 |
一、更换pip为国内源
1.使用PyCharm创建一个工程 2.通过File -> Setting…选择解释器为本工程下的Python解释器。 3.单击下图中添加“+”, 4.单击下图中的“Manage Repositories”按钮, 6.目前国内靠谱的 pip 镜像源有: - 清华:https://pypi.tuna.tsinghua.edu.cn/simple - 阿里云:http://mirrors.aliyun.com/pypi/simple/ - 中国科技大学 :https://pypi.mirrors.ustc.edu.cn/simple/ - 豆瓣:http://pypi.douban.com/simple/择一即可。
二、有的包只能使用pip默认源下载 使用清华源等国内源下载速度很快,但是修改pip默认镜像源后,有的包可能只有默认源有。只能临时使用默认源安装:(pip默认镜像地址:https://pypi.org/simple) pip install -i https://pypi.org/simple三、镜像源使用方法: pip install -i四、PyCharm依赖包导入导出方法 在PyCharm的terminal中输入: 1.将依赖包导出至requirements文件 pip freeze > requirements.txt2.从requirements文件中导入依赖包 pip install -r requirements.txt |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |