pycharm 安装py-PDE问题

new9mtju  于 2023-02-16  发布在  PyCharm
关注(0)|答案(1)|浏览(195)

我正在尝试安装python软件包py-pde。
我目前的python版本是3.9。
在终端上使用命令'pip install py-pde'进行pip安装。
然而,当我尝试在我的IDE - PyCharm上安装它时,我得到了这个错误:

Collecting py-pde
  Using cached py_pde-0.27.1-py3-none-any.whl (269 kB)
Requirement already satisfied: matplotlib>=3.1.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from py-pde) (3.6.2)
Collecting numba>=0.56.0
  Using cached numba-0.56.4.tar.gz (2.4 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/sl/b99vml7s45q3zx3wb1fqvq240000gp/T/pip-install-pu5ucxpg/numba_1e4a8190083b40fba0897686608f79d0/setup.py", line 51, in <module>
          _guard_py_ver()
        File "/private/var/folders/sl/b99vml7s45q3zx3wb1fqvq240000gp/T/pip-install-pu5ucxpg/numba_1e4a8190083b40fba0897686608f79d0/setup.py", line 48, in _guard_py_ver
          raise RuntimeError(msg.format(cur_py, min_py, max_py))
      RuntimeError: Cannot install on Python version 3.11.0; only versions >=3.7,<3.11 are supported.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

你知道这是怎么回事吗?
具体来说,它说不能在Python 3.11上安装,尽管我用pip检查了我的Python版本--version是3.9。
不知道出了什么问题。谢谢帮忙。

mi7gmzs6

mi7gmzs61#

应该像alt + ctrl + s一样简单地进入设置。
然后导航到项目:“你的项目”〉〉Python解释器。然后浏览到你想使用的解释器而不是3.11。

***编辑:***下面是JetBrains(PyCharm母公司)的link文档,介绍如何更改解释器。

相关问题