尝试从File-> Settings-> Python Interpreter安装conda软件包失败。以下是输出
PyCharm发出的消息是
ERROR: Could not find a version that satisfies the requirement menuinst (from conda) (from versions: none)
try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at '<UserName>\Pycharm\pythonProject\venv\Scripts\python.exe'.
的输出
<UserName>\PyCharm\pythonProject\venv\Scripts\python.exe -m pip --version
是pip 20.2.4
。 PyCharm解释器设置中的pip版本也是pip 20.2.4
当我第一次尝试仅通过输入import numpy as np
来导入numpy时,PyCharm无法成功安装numpy,并给出了从终端使用pip进行安装的消息,从终端进行安装也未成功。然后在File-> Settings的Python Interpreter Settings中安装了Numpy。之后,在安装NumPy之前,PyCharm甚至无法检测到导入语句并无法提供安装NumPy