阿里云源 Python、npm、git、goproxy

阿里云源 Python、npm、git、goproxy

各种设置源的方式也都比较常见,但是根本记不住,每次都查感觉也不太好。

正好发现了个宝藏地址,看起来还挺全的,以后找源也可以先在这个地方翻翻,顺便就搞了几个放到一个脚本里边。

脚本内容

bash 复制代码
#### python start ####
#### https://developer.aliyun.com/mirror/pypi?spm=a2c6h.13651102.0.0.28df1b11Iu49KV

mkdir -p ~/.pip

PYTHON_PIP=~/.pip/pip.conf

# echo "[global]" > $PYTHON_PIP
# echo "index-url = http://mirrors.aliyun.com/pypi/simple/" >> $PYTHON_PIP
# echo "" >> $PYTHON_PIP
# echo "[install]" >> $PYTHON_PIP
# echo "trusted-host=mirrors.aliyun.com" >> $PYTHON_PIP

echo "[global]
index-url = http://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com
" > $PYTHON_PIP

#### python end ####

#### golang start ####
#### https://developer.aliyun.com/mirror/goproxy?spm=a2c6h.13651102.0.0.595d1b11ObQLXj

export GOPROXY=https://mirrors.aliyun.com/goproxy/

#### golang end ####


#### npm start ####
#### https://developer.aliyun.com/mirror/NPM?spm=a2c6h.13651102.0.0.595d1b11ObQLXj

npm config set registry https://registry.npmmirror.com

#### npm end ####

使用

把以上的内容贴到各种终端环境文件中,例如 bashrc/bash_profile 等等。。。

参考文件

相关推荐
失散1319 分钟前
Python——1 概述
开发语言·python
萧鼎22 分钟前
Python 图像哈希库 imagehash——从原理到实践
开发语言·python·哈希算法
qq_2515335922 分钟前
使用 Python 提取 MAC 地址
网络·python·macos
Data_agent2 小时前
学术爬虫实战:构建知网论文关键词共现网络的技术指南
python·算法
_一路向北_4 小时前
爬虫框架:Feapder使用心得
爬虫·python
皇族崛起4 小时前
【3D标注】- Unreal Engine 5.7 与 Python 交互基础
python·3d·ue5
你想知道什么?5 小时前
Python基础篇(上) 学习笔记
笔记·python·学习
Swizard5 小时前
速度与激情:Android Python + CameraX 零拷贝实时推理指南
android·python·ai·移动开发
一直跑6 小时前
Liunx服务器centos7离线升级内核(Liunx服务器centos7.9离线/升级系统内核)
python
leocoder6 小时前
大模型基础概念入门 + 代码实战(实现一个多轮会话机器人)
前端·人工智能·python