文章目录
- 一、zsh: command not found: python
- 二、Python pip安装Django异常Could not find a version that satisfies the requirement pytz (from django)
- 三、WARNING: You are using pip version 21.2.4, however version 23.2.1 is available.
- 四、pip install django下载报错
一、zsh: command not found: python
安装python后没有发现
-
先检查是否安装Python
可以看到安装了Python -
运行
python3 --version
-
修改python3 为 python 命令的话 参考博文
https://blog.csdn.net/rothschild666/article/details/125066489
二、Python pip安装Django异常Could not find a version that satisfies the requirement pytz (from django)
找不到满足的版本
解决方案:打开Django官网查看最新版本,将版本号填充好再运行OK了
pip install django==4.1.1
三、WARNING: You are using pip version 21.2.4, however version 23.2.1 is available.
解决方案: python3 -m pip install --upgrade pip
安装更新Pip
使用镜像更新
python -m pip install --upgrade pip -i https://pypi.douban.com/simple
四、pip install django下载报错
RROR: Exception:
Traceback (most recent call last):
下载压缩包:
下载 Django 压缩包,解压,进入 Django 目录,执行python3 setup.py install
,然后开始安装,Django将要被安装到Python的Lib下site-packages。
检查是否安装成功
cmd下进入python环境 :
import django
django.VERSION 或 django.get_version()