简体   繁体   English

使用 anaconda 安装软件包

[英]Installing packages using anaconda

I am trying to install scrapy and pandas using anaconda on my windows computer, but I am running into issues.我正在尝试在我的 Z0F4137ED1502B5045D6083AA28 计算机上使用 anaconda 安装 scrapy 和 pandas I am sure I installed both packages correctly.我确定我正确安装了这两个软件包。 I tried using both the anaconda navigator, pip, and a conda command.我尝试使用 anaconda 导航器、pip 和 conda 命令。 These do successfully install in my environment, as I can see these in my installed packages in anaconda.这些确实在我的环境中成功安装,因为我可以在 anaconda 中安装的包中看到这些。 However, when I try running a simple scraping script, I get a ModuleNotFoundErrors for every package.但是,当我尝试运行一个简单的抓取脚本时,每个 package 都会出现 ModuleNotFoundErrors。 I think it may have to do with the versions of python I have installed, but I'm not sure.我认为这可能与我安装的 python 的版本有关,但我不确定。 I have python 3.8 installed.我安装了 python 3.8。

When using anaconda, you will need to create an environment:使用 anaconda 时,需要创建环境:

conda create -n <given name> python=3.7

then activate the environment:然后激活环境:

source activate <given name>

Now go ahead and install packages using pip.现在 go 提前并使用 pip 安装软件包。

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

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