Name:pypi
Path:选择存储路径
点击设置 - -> Repositories -- > Create repository --> pypi(proxy)进入
Name:pypi-proxy
Remote storage:填入阿里云的源地址: http://mirrors.aliyun.com/pypi/
Blob store:pypi
点击设置 - -> Repositories -- > Create repository --> pypi(hosted)进入
Name:pypi-hosted
Blob store:pypi
点击设置 - -> Repositories -- > Create repository --> pypi(group)进入
Name:pypi-group
Blob store:pypi
选择pypi-proxy和pypi-hosted
pip3 install flask --index-url=http://{nexus的ip:端口}/repository/pypi-proxy/simple --trusted-host=nexus的ip
示例:
pip3 install flask --index-url=http://192.168.1.100:8081/repository/pypi-group/simple --trusted-host=192.168.1.100
C盘-->用户-->admin(自己的账户名)
新建pip文件夹,pip文件夹下新建pip.ini文件
写入以下内容
[global]
index-url = http://192.168.1.100:8081/repository/pypi-group/simple
[install]
trusted-host = 192.168.1.100
nexus设置--》Security--》Anonymous,勾选Allow anonymous users to access the server即可