简体   繁体   English

将软件包安装到Anaconda Environments

[英]Installing packages to Anaconda Environments

I've been having an issue with Anaconda, on two separate Windows machines. 我在两台单独的Windows机器上遇到Anaconda的问题。

I've downloaded and installed Anaconda. 我已经下载并安装了Anaconda。 I know the commands, how to install libraries, I've even installed tensorflow-gpu (which works). 我知道命令,如何安装库,甚至安装了tensorflow-gpu(可以工作)。 I also use Jupyter notebook and I'm quite familiar with it by this point. 我也使用Jupyter笔记本,到目前为止,我对它非常熟悉。

The issue: For some reason, when I create new environments and install libraries to that environment... it ALWAYS installs them to (base). 问题:由于某种原因,当我创建新环境并将库安装到该环境时...总是将它们安装到(基础)。 Whenever I try to run code in a jupyter notebook that is located in an environment other than (base), it can't find any of the libraries I need... because it's installing them to (base) by default. 每当我尝试在除(base)以外的环境中的jupyter笔记本中运行代码时,它都找不到我需要的任何库...,因为默认情况下会将其安装到(base)。

I always ensure that I've activated the correct environment before installing any libraries. 在安装任何库之前,我始终确保已激活正确的环境。 But it doesn't seem to make a difference. 但这似乎没有什么不同。

Can anyone help me with this... am I doing something wrong? 谁能帮我这个忙...我做错什么了吗?

Kind of fixed my problem. 解决了我的问题。 It is to do with launching Jupyter notebook. 这与启动Jupyter笔记本有关。

After switching environment via command prompt... the command 'jupyter notebook' runs jupyter notebook via the default python environment, regardless. 通过命令提示符切换环境后,命令'jupyter notebook'会通过默认的python环境运行jupyter notebook,无论如何。

However, if I switch environments via anaconda navigator and launch jupyter notebook from there, it works perfectly. 但是,如果我通过anaconda导航器切换环境并从那里启动jupyter笔记本,它会完美运行。

Maybe I'm missing a command via the prompt? 也许我在提示符下缺少命令?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM