Python

设置pip源
临时命令:
* pip install -i http://nexus.td.internal/nexus/repository/pypi_group/simple --trusted-host nexus.td.internal
全局命令:
* 查看源设置 pip config list
* 设置源 pip config set global.index-url http://pypi.tuna.tsinghua.edu.cn/simple
* 信任源 pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn
源资源:
* 官方源 https://pypi.org/simple/
* 腾讯源 https://mirrors.cloud.tencent.com/pypi/simple
* 阿里源 https://mirrors.aliyun.com/pypi/simple/
* 豆瓣 https://pypi.doubanio.com/simple/
* 网易源 https://mirrors.163.com/pypi/simple/
* 科大源 https://pypi.mirrors.ustc.edu.cn/simple/
* 清华源 https://pypi.tuna.tsinghua.edu.cn/simple/
* 木鸡nexu仓库 http://nexus.td.internal/nexus/#browse/search/pypi= 找包的绝对url安装
* 木鸡源 http://nexus.td.internal/nexus/repository/pypi_group/simple

设置conda Env
* conda list --revisions 查看当前环境后续折腾过的情况
* conda install --revision REV_NUM 回滚重置当前环境,默认为0

pip每次WARNING: Ignoring invalid distribution -andas 解决

问题过程:
(at38risk4) PS D:\codePython\GitlabRepos\at-documents> pip list|findstr "rqalpha api pandas numpy"
WARNING: Ignoring invalid distribution -andas (c:\users\cat\appdata\roaming\python\python38\site-packages)
WARNING: Ignoring invalid distribution -andas (c:\users\cat\appdata\roaming\python\python38\site-packages)
WARNING: Ignoring invalid distribution -andas (c:\users\cat\appdata\roaming\python\python38\site-packages)
market-data-python-api 2.3.9
numpy                  1.23.0
pandas                 1.0.3
rqalpha                6.0.5
rqalpha-mod-pyspec     2.8.17

解决:
(at38risk4) PS D:\codePython\GitlabRepos\at-documents> cd c:\users\cat\appdata\roaming\python\python38\site-packages
(at38risk4) PS C:\users\cat\appdata\roaming\python\python38\site-packages> dir ~*
    目录: C:\Users\cat\AppData\Roaming\Python\Python38\site-packages

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         2023/3/30     09:53                ~andas
d-----         2023/3/30     09:53                ~andas-1.5.3.dist-info
d-----         2023/3/22     11:24                ~umpy

(at38risk4) PS C:\users\cat\appdata\roaming\python\python38\site-packages> rmdir ~*
C:\users\cat\appdata\roaming\python\python38\site-packages\~andas 处的项具有子项,并且未指定 Recurse 参数。如果继续,所有子项均将随该项删除。是否确实要继续?
C:\users\cat\appdata\roaming\python\python38\site-packages\~andas-1.5.3.dist-info 处的项具有子项,并且未指定 Recurse 参数。如果继续,所有子项均将随该项删除。是否确实要继续?
[Y] 是(Y)  [A] 全是(A)  [N] 否(N)  [L] 全否(L)  [S] 暂停(S)  [?] 帮助 (默认值为“Y”): Y
C:\users\cat\appdata\roaming\python\python38\site-packages\~umpy 处的项具有子项,并且未指定 Recurse 参数。如果继续,所有子项均将随该项删除。是否确实要继续?
[Y] 是(Y)  [A] 全是(A)  [N] 否(N)  [L] 全否(L)  [S] 暂停(S)  [?] 帮助 (默认值为“Y”): Y
(at38risk4) PS C:\users\cat\appdata\roaming\python\python38\site-packages> pip list|findstr andas
pandas                 1.0.3