惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
The Hacker News
The Hacker News
L
LINUX DO - 最新话题
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
S
Secure Thoughts
S
Schneier on Security
MyScale Blog
MyScale Blog
月光博客
月光博客
U
Unit 42
www.infosecurity-magazine.com
www.infosecurity-magazine.com
AI
AI
N
News and Events Feed by Topic
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
S
Securelist
B
Blog RSS Feed
Spread Privacy
Spread Privacy
H
Help Net Security
Know Your Adversary
Know Your Adversary
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
V
V2EX
MongoDB | Blog
MongoDB | Blog
GbyAI
GbyAI
博客园 - 叶小钗
D
DataBreaches.Net
T
Troy Hunt's Blog
Project Zero
Project Zero
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
K
Kaspersky official blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Latest news
Latest news
S
Security @ Cisco Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
The GitHub Blog
The GitHub Blog
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
O
OpenAI News
Recorded Future
Recorded Future
Help Net Security
Help Net Security
罗磊的独立博客

博客园 - 过错

vscode的continue中配置第三方模型。以agnes-ai为例 在 Docker 容器中运行 .NET 6 并使用 libgdiplus(通常是为了支持 System.Drawing.Common 进行图片处理),你需要完成以下两个核心步骤 vs code调试netcore 为Ubuntu24生成netcore10的镜像, linux安装netcore nginx postgresql ssh 各种加速 不使用Debezium,记录PostgreSQL中的数据的数据前后变化 docker加速 netcore 发布命令 一些代码库 The database cluster initialisation failed but was not the same version as initdb的解决办法(postgresql) NDVI计算 ,c#和python代码实现 使用c#调用chatgpt 。以下代码由ai自动生成。 vs Commit message的使用 Fiddler 替换资源 docker 部署 rabbitmq(持久化) 和postgresql redis mysql 油猴子常用脚本 通过nginx做身份验证网关的方法 ngnix 常用配置 Nginx配置之实现多台服务器负载均衡 Nginx配置优化详解 ngnix代理grpc
python的一些设置
过错 · 2024-03-11 · via 博客园 - 过错

1 全局设置pip加速。

查找pip.ini文件,添加以下代码
[global]
index-url = http://pypi.tuna.tsinghua.edu.cn/simple/
[install]
trusted-host = pypi.tuna.tsinghua.edu.cn

2 执行 poetry install 命令

单个项目: pyproject.toml文件加入以下内容可以加速
[[tool.poetry.source]]
name="aliyun"
url="http://pypi.tuna.tsinghua.edu.cn/simple/"
default=true
如果上面报错 执行 poetry lock --no-update

3 运行 poetry

poetry run python app/main.py

二 conda

4 创建环境

-- 创建名为 python3115 的python版本为3.11.5的环境
conda create --name python3115 python=3.11.5

5 查看配置

conda info --envs

6 激活环境

activate python3115

7 查看安装了哪些包

conda list

8 查看当前存在哪些虚拟环境

conda env list
conda info -e

9 更新当前conda

conda update conda

10 对虚拟环境中安装额外的包

conda install -n your_env_name [package]
pip install requests

11 关闭虚拟环境(即从当前环境退出返回使用PATH环境中的默认python版本)

deactivate env_name 或者 activate root 切回root环境. Linux下:source deactivate

12 删除虚拟环境

conda remove -n your_env_name --all

13 删除环境钟的某个包

conda remove --name $your_env_name $package_name
conda remove requests
pip uninstall requests

14 添加pytorch的镜像

conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/pytorch/

15 pip 永久换源

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