【Python】记录第一次接 python 项目搭建环境的问题

  1. python安装指定版本的包
bash 复制代码
pip install package==version
  1. 查看包版本
bash 复制代码
pip show <package_name>
  1. 运行main函数报 coreapi 错误

AssertionError: coreapi must be installed for schema support.

错误解 pip install coreapi

  1. 修改 pip install 目录

有可能会没有,要自己手动建

bash 复制代码
C://Users//账号//AppData//Romaing//Python//pip//pip.ini
  1. 修改 pip 配置源
bash 复制代码
pip install mysqlclient -i https://pypi.tuna.tsinghua.edu.cn/simple
  1. Python was not found

解决"Python was not found; run without arguments to install from the Microsoft Store..."问题

环境变量里面移除C:\AppData\Local\Microsoft\WindowsApps 这个变量

  1. Could not build wheels for cx_Oracle

ERROR: Could not build wheels for cx_Oracle, which is required to install py:这个 cx_Oracle 安装失败主要是因为python版本过高,我改回 python 3.10.x

相关推荐
devilnumber6 小时前
Java 递归算法 详解 + 核心要点 + 实战运用 + 避坑指南
java·开发语言·算法
大貔貅喝啤酒6 小时前
Python Requests库教程
自动化测试·python·requests库
copyer_xyf7 小时前
LangChain 调用 LLM
后端·python·agent
copyer_xyf7 小时前
Prompt 组织管理
后端·python·agent
asdfg12589637 小时前
JavaBean是什么?怎么理解?有什么用途?
java·开发语言
dsyyyyy11017 小时前
JavaScript变量
开发语言·javascript·ecmascript
shimly1234568 小时前
python3 uvicorn 是啥?
python
z落落8 小时前
C#WinForm 窗体切换与窗体传值(登录跳转案例)+WinForm 窗体传值(从上往下传、从下往上传)
开发语言·windows·c#
CTA量化套保9 小时前
期货量化程序 time.sleep 卡死:天勤单线程与 deadline 替代
python·区块链
allway29 小时前
How to Echo Multiline to a File in Bash [3 Methods]
开发语言·chrome·bash