我是python的新手,刚刚安装了python 3.8.2并使用pycharm尝试编程
我想我的pip总是存在错误,它总是直接指向python 2.7的目录,并且我尝试使用别名作为新版本,这看起来很好,但是当我使用pip安装pygame时,它仍然保存在python下的文件夹中2.7
which python
python:别名为/usr/local/bin/python3.8
which pip
pip:别名为/usr/local/bin/pip3.8
当我尝试
pip install pygame
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pygame in ./Library/Python/2.7/lib/python/site-packages (2.0.0.dev6)
答案 0 :(得分:2)
使用pip3 install pygame
。您可以使用pip3
安装python 3.x.x 模块。
我确定pygame不支持python 3.8.x ,因此您会收到错误消息,请尝试将其安装在python 3.6.x 环境中。