[英]Installing python packages from cmd in windows 10
I recently downloaded anaconda and added it to the environment variables following the question below: anaconda - path environment variable in windows . 我最近下载了anaconda,并将其添加到以下问题中的环境变量中:Windows中的anaconda-path环境变量 。
I added it as 我将其添加为
C:\Users\My_User\Anaconda3
The thing is, I've been trying to install some packages using either pip or conda without luck. 问题是,我一直在尝试使用pip或conda安装某些软件包而没有运气。
For instance: 例如:
pip install seaborn
Return the following 返回以下
Does somebody know how can I enable package installation either through pip or conda? 有人知道如何通过pip或conda启用软件包安装吗?
I'm very new to executing commands through cmd and couldn't figure out a better way to type my question, sorry about that 我对通过cmd执行命令非常陌生,无法找到一种更好的方式输入我的问题,对此感到抱歉
Step 1: Open Anaconda Navigator navigator 第1步:打开Anaconda Navigator 导航器
Step 2: Go to Environments and select All packages, to view the list of all packages installed. 步骤2:转到Environments(环境)并选择All package(所有软件包),以查看所有已安装软件包的列表。 environment packages
环境套餐
Step 3: Look for seaborn in the Search bar search bar 第3步:在搜索栏搜索栏中查找seaborn
Install it and see if that works. 安装它,看看是否可行。
If it doesn't then try creating a new environment and installing the seaborn package there. 如果没有,请尝试创建新环境并在其中安装seaborn软件包。 create new environment
创造新环境
尝试
python -m pip install seaborn
You're getting this error because you're running pip
from inside of the Python interpreter when you should be running it from the command line. 您收到此错误的原因是,当您应该从命令行运行它时,是从Python解释器内部运行
pip
。 To exit the Python interpreter, press ctrl+d
. 要退出Python解释器,请按
ctrl+d
。 Then, make sure you have pip
installed and in your PATH and you can try again. 然后,请确保已在路径中安装了
pip
,然后可以重试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.