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

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
G
GRAHAM CLULEY
Spread Privacy
Spread Privacy
Last Week in AI
Last Week in AI
腾讯CDC
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Security Archives - TechRepublic
Security Archives - TechRepublic
博客园 - 司徒正美
爱范儿
爱范儿
雷峰网
雷峰网
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
博客园 - 聂微东
T
Tor Project blog
I
Intezer
大猫的无限游戏
大猫的无限游戏
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Schneier on Security
Schneier on Security
T
Tenable Blog
Google Online Security Blog
Google Online Security Blog
S
Schneier on Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
Help Net Security
Help Net Security
O
OpenAI News
博客园 - 【当耐特】
博客园 - Franky
AWS News Blog
AWS News Blog
罗磊的独立博客
J
Java Code Geeks
Know Your Adversary
Know Your Adversary
A
Arctic Wolf
小众软件
小众软件
量子位
SecWiki News
SecWiki News
S
Security Affairs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
N
News and Events Feed by Topic
Apple Machine Learning Research
Apple Machine Learning Research
H
Heimdal Security Blog
Google DeepMind News
Google DeepMind News
IT之家
IT之家

博客园 - 过错

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/