【发布时间】:2021-04-13 15:21:00
【问题描述】:
我是在线学习教程的新手。我在使用 PyCharm、Python 和 Anaconda 时遇到了真正的麻烦。两个问题:
(1) 当我在 CMD 中“pip install x”时,它们似乎只安装在 Anaconda 站点包中,而不是 Python 包中。我需要同时安装两者才能同时访问吗?
(2) 我认为拥有 Anaconda 的原因是因为它带有像 numpy 这样的包。当我在 Conda 或 Python39 环境中的 PyCharm 中“导入 numpy”时,它说找不到模块,无论如何我都必须安装它。重点是什么?为此我创建了一个 PyCharm Conda 环境来使用这些包?
我在系统 PATH 变量中有 C:...\anaconda3、.\scripts & .\bin,在用户 PATH 变量中有 C:...\Python39 & .\bin。
如果有人能澄清事情,我将不胜感激。谢谢。
INPUT-> C:\Users\tk20blue>where pip
C:\Users\tk20blue\anaconda3\Scripts\pip.exe
C:\Users\tk20blue\AppData\Local\Programs\Python\Python39\Scripts\pip.exe
INPUT-> C:\Users\tk20blue>where python
C:\Users\tk20blue\anaconda3\python.exe
C:\Users\tk20blue\AppData\Local\Programs\Python\Python39\python.exe
C:\Users\tk20blue\AppData\Local\Microsoft\WindowsApps\python.exe
INPUT-> C:\Users\tk20blue>where anaconda
C:\Users\tk20blue\anaconda3\Scripts\anaconda.exe
INPUT-> C:\Users\tk20blue>python --version
Python 3.8.5
INPUT -> C:\Users\tk20blue>py
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
【问题讨论】: