使用anaconda创建爬虫spyder工程

1.由于每个工程使用的环境都可能不一样,因此一个好的习惯就是不同的工程都创建属于自己的环境,在anaconda中默认的环境是base,我们现在来创建一个名为spyder的环境,专门用于爬虫工程:

kotlin 复制代码
//括号中名字,代表当前的环境
(base)dragon@machine: $ conda create --name=spyder

2.激活环境

kotlin 复制代码
// 环境从base切换到example
(base)dragon@machine: $ conda activate spyder

3.安装spyder- kernels

kotlin 复制代码
// 环境已从base切换到spyder
(spyder)dragon@machine: $ conda install spyder-kernels

到此spyder的环境就创建好了,接下来我们来使用这个环境来开发。

kotlin 复制代码
(spyder)dragon@machine: $ conda activate base

5.启动navigator

kotlin 复制代码
(spyder)dragon@machine: $ anaconda-navigator

6. 点击Spyder的launch按钮,启动这个IDE

7. 启动IDE后,修改运行环境,点击右下角Completions:conda(base) ->Change default environment in Preferences...

8.选择相应Python interpreter -> Use the following Python interpreter,然后选择spyder环境下的python解析器,如下图所示:

使用anaconda 创建spyder工程是很方便的。

相关推荐
深蓝电商API1 小时前
淘宝反爬升级应对:从Selenium到Playwright的迁移实践
爬虫·淘宝
WL_Aurora2 小时前
Python爬虫实战(二):百度热搜榜单爬取
爬虫·python
Marvel__Dead4 小时前
微调 Gemma 4 识别腾讯天御全系列验证码【解决方案-一个模型识别 滑块|文字点选|图标点选|空间点选】
人工智能·爬虫·python·验证码识别·ai 大模型
跨境数据猎手4 小时前
反向海淘代购集运系统三种搭建路径对比:自研、开源二开、SaaS
爬虫·系统架构·开源
川冰ICE6 小时前
Python爬虫实战⑲|Pandas数据合并与重塑,多数据源整合
爬虫·python·pandas
feasibility.17 小时前
反爬十层妖塔:现代爬虫攻防的立体战争
爬虫·python·科技·scrapy·rust·go·硬件
小白学大数据20 小时前
基于大模型的Python智能爬虫:语义识别与数据清洗实践
开发语言·爬虫·python·数据分析
无限中终1 天前
如何抓取某音视频的互动数据
爬虫·python
WL_Aurora1 天前
Python爬虫实战(一):图书网站API接口爬取
爬虫·python
川冰ICE2 天前
Python爬虫实战⑱|Pandas分组聚合,一键生成统计报表
爬虫·python·pandas