在看《集体智慧编程》时碰到python3环境下安装feedparser的问题,搜索发现很多人碰到此问题,最终找以下方法解决。

how to install feedparser on python3

Approach A: Using Pip

The
best method for installing FeedParser (or almost any Python package) is
by using pip, Python's package manager. pip will be installed by
default alongside Python as of Python 3.4 (and Python 2.7.9). Since the
latest version of Python (as of time of editing) is Python 3.5, this is
really the approach you should be taking whenever possible.

To run pip, do the following:

Open the command line. You can do this by clicking start, then typing cmd in the run textbox.
    Make sure you are connected to the internet.
    Type in pip install feedparser and hit enter (and wait for pip to download and install FeedParser)

You're done! Open up IDLE and type in import feedparser to confirm.

If attempting to use pip fails for some reason, try...

Typing in C:\Python34\Scripts\pip install feedparser (or wherever you installed Python)
   
Closing the command line, and re-opening it in admin mode (click start,
type 'cmd', right-click, select "Run as Administrator"), if it's
failing due to permission errors

If
you would like to learn more about pip, or need help setting it up on
older versions of Python, see this
post(http://stackoverflow.com/questions/15724093/difference-between-python-setup-py-install-and-pip-install/15731459#15731459).

Approach B: Manual install

If, for some reason, you are unable to use pip, you can always try doing a manual install.
Part A: Prerequisites:

Feedburner
needs a module named setuptools in order to install. Unfortunately,
setuptools isn't compatible with Python 3.x, but you can use something
called Distribute as a convenient replacement. If you already have this
installed, you can skip Part A.

Download the "installer" here:
http://python-distribute.org/distribute_setup.py. This is a Python
script that will download the required components from the internet and
install Distribute for you.

Open the command line. You can do this by clicking start, then typing
cmd in the run textbox. Navigate over to the folder containing
distribute_setup.py by using cd. On my system, I typed cd
C:\Users\Michael0x2a\Downloads

Type python distribute_setup.py (and if that doesn't work,
C:\Python32\python.exe distribute_setup.py (or wherever you did install
Python)). A bunch of text should appear and scroll by.

Part B: Actually installing feedparser:

Download and extract the latest file from here: https://github.com/kurtmckee/feedparser/releases

Navigate in the command line to where the extracted feedparser folder
is by using the cd command. For example, on my computer, I typed:

cd C:\Users\Michael0x2a\Downloads\feedparser-5.1\feedparser-5.1

(Your version number will probably differ. For example, you might have feedparser-5.3 or something)

Make sure the folder you're in has the readme, various other docs, and
setup.py. To check, type dir into the command line. It should list the
files and folders there.

Type python setup.py install (or C:\Python34\python.exe setup.py install.). Text should appear and slowly scroll by.

You're done! Open up IDLE and type import feedparser to confirm.

python3安装 feedparser的更多相关文章

  1. ubuntu16.04 python3 安装selenium及环境配置

    环境 ubuntu16.04 python3 安装selenium sudo pip3 install seleium 默认安装完是支持firefox,但是更新得太慢对于较新的firefox已经不支持 ...

  2. suse11 安装 python3.6 python3 安装步骤

    首先需要去网上下载Python-3.6.4.tgz,libopenssl-devel-0.9.8j-2.1.x86_64.rpm zlib-devel-1.2.7-3.14.x86_64.rpm li ...

  3. CentOS7.5 Python3安装pip报错:ModuleNotFoundError: No module named '_ctypes' --Python3

    1.问题:pyhontModuleNotFoundError: No module named '_ctypes'  操作系统:CentOS7.5 安装完Pyhotn3后(如何安装Python3,安装 ...

  4. Python2和Python3安装注意事项

    1. 到官网 https://www.python.org/downloads/windows/ 下载 Windows x86-64 executable installer版本: 2. python ...

  5. python3安装PIL

    原创    2017-09-29 16:15:27 系统环境: 64位win10系统,同时安装python2.7与python3.6两个版本 安装: PIL是Python平台事实上的图像处理标准库,支 ...

  6. python3安装PIL提示Could not find a version that satisfies the requirement pil

    python3安装PIL提示如下错误,安装指令是pip3 install PIL,这个是因为PIL(Python Imaging Library)是Python中一个强大的图像处理库,但目前其只支持到 ...

  7. mac python3安装virtualenv出现的问题

    pip3 install virtualenv pip3 install virtualenvwrapper 安装成功后可能 找不到该命令, 解决办法 1.在 vim ~/.bashrc export ...

  8. Python3安装turtle提示错误:Command "python setup.py egg_info" failed with error code 1

    Python3安装turtle提示错误:Command "python setup.py egg_info" failed with error code 1 Python3.5安 ...

  9. python3 安装

    Centos7 安装python3 #安装sqlite-devel yum -y install sqlite-devel #安装依赖 yum -y install make zlib zlib-de ...

随机推荐

  1. Ubantu 新建用户后没有生成对应文件夹

    原命令:useradd python 改正后:useradd python -m 后成功在home目录下创建文件夹 原因: man useradd就可以看到如此介绍:Create the user´s ...

  2. PHP echo汉字出现乱码的情况之一

    当然首先要理清楚到底是web服务端造成,php造成的,还是数据库造成的. 需要在头文件里UTF-8 <head> <meta http-equiv="Content-Typ ...

  3. Win10的Hosts文件修改后无法保存的问题解决方法,实测可以

    1.hosts文件是什么?有什么作用呢? Hosts是一个没有扩展名的系统文件,可以用记事本等工具打开,其作用就是将一些常用的网址域名与其对应的IP地址建立一个关联“数据库”,当用户在浏览器中输入一个 ...

  4. sqlserver卸载

  5. ssh-copy-id:/usr/bin/ssh-copy-id: ERROR: No identities found

    $ ssh-copy-id remote-machine 公钥,私钥已经生成,执行上述命令完毕出现如下错误: /usr/bin/ssh-copy-id: ERROR: No identities fo ...

  6. 【转】Jmeter性能测试报告解析

    Jmeter报告解析 1.Aggregate Report 解析 Aggregate Report 是 JMeter 常用的一个 Listener,中文被翻译为“聚合报告”.今天再次有同行问到这个报告 ...

  7. VirtualBox 虚拟机 centos7 下 设置静态ip 并支持 xshell 远程登陆的设置方法

    1.设置虚拟机使用“桥接模式” 2.使用 vi /etc/sysconfig/network-scripts/ifcfg-enp0s3  打开配置文件(其中 enp0s3 是你的linux的网卡名,在 ...

  8. redirect uri 参数错误 怎么办

    这种情况,多数是因为请求地址不合法所致. 去公众号中添加合法的地址. 这种地址需要满足一些条件. 设置地址 满足的条件 保证可以访问到安全文件 如果访问不到的话,将无法保存 这里是文件存放位置 经过这 ...

  9. python中的异常处理机制

    python中的异常处理 1.什么是异常 异常就是程序运行时发生错误的信号(在程序出现错误时,则会产生一个异常,若程序没有处理它,则会抛出该异常,程序的运行也随之终止),在python中,错误触发的异 ...

  10. Kali下Ahmyth的使用

    项目地址:https://github.com/AhMyth/AhMyth-Android-RAT 下载后打开 安装nodejs,nodejs在官网下载,下载完后解压,切到bin目录下 设置全局 ro ...