0

我正在尝试安装 html2text,以便可以将 Tumblr 帖子转换器用于 jekyll,我正在尝试安装 html2text,但是当我执行“pip install html2text”时,我在错误日志中收到以下错误:

    ------------------------------------------------------------
/usr/local/bin/pip run on Fri May 24 13:42:37 2013
Downloading/unpacking html2text
  Getting page http://pypi.python.org/simple/html2text
  URLs to search for versions for html2text:
  * http://pypi.python.org/simple/html2text/
  Getting page http://www.aaronsw.com/2002/html2text/
  Analyzing links from page http://pypi.python.org/simple/html2text/
    Found link http://pypi.python.org/packages/source/h/html2text/html2text-3.01.tar.gz#md5=8f0ea7fb916d01a76c0f3fe5ae95cbd6 (from http://pypi.python.org/simple/html2text/), version: 3.01
    Found link http://pypi.python.org/packages/source/h/html2text/html2text-3.200.2.tar.gz#md5=05f3a316942d095131978f03505cb82f (from http://pypi.python.org/simple/html2text/), version: 3.200.2
    Found link http://pypi.python.org/packages/source/h/html2text/html2text-3.1.tar.gz#md5=f0fc0040a8833574073109071ef21456 (from http://pypi.python.org/simple/html2text/), version: 3.1
    Skipping link http://pypi.python.org/packages/2.5/h/html2text/html2text-2.35-py2.5.egg#md5=bc39d38f61f8beb740f59d8d5a6d0bc6 (from http://pypi.python.org/simple/html2text/); unknown archive format: .egg
    Found link http://pypi.python.org/packages/source/h/html2text/html2text-3.200.1.tar.gz#md5=ab9a4666f755b94d799fc9558156ce6b (from http://pypi.python.org/simple/html2text/), version: 3.200.1
    Found link http://pypi.python.org/packages/source/h/html2text/html2text-2.35.zip#md5=bca27646cd1c3bde64d36ba12bedd521 (from http://pypi.python.org/simple/html2text/), version: 2.35
    Found link http://pypi.python.org/packages/source/h/html2text/html2text-3.02.tar.gz#md5=bc1cac9fe1056d24d7d5bfde7da745c1 (from http://pypi.python.org/simple/html2text/), version: 3.02
    Found link http://pypi.python.org/packages/source/h/html2text/html2text-2.38.tar.gz#md5=e4a725159a45ceeeda5378cef580e0c3 (from http://pypi.python.org/simple/html2text/), version: 2.38
    Found link http://pypi.python.org/packages/source/h/html2text/html2text-3.101.tar.gz#md5=0536285e5f9b50ebee219390bb9c1438 (from http://pypi.python.org/simple/html2text/), version: 3.101
    Found link http://pypi.python.org/packages/source/h/html2text/html2text-2.37.tar.gz#md5=8a3e60701088eec8c913f430ba0b05aa (from http://pypi.python.org/simple/html2text/), version: 2.37
    Found link http://pypi.python.org/packages/source/h/html2text/html2text-3.200.0.tar.gz#md5=7b8f684155424ca1c16acb8f0adfdbcd (from http://pypi.python.org/simple/html2text/), version: 3.200.0
    Found link http://pypi.python.org/packages/source/h/html2text/html2text-3.200.3.tar.gz#md5=98162c467ddafc1a63bff8db98f03d14 (from http://pypi.python.org/simple/html2text/), version: 3.200.3
    Skipping link http://www.aaronsw.com/2002/html2text/ (from http://pypi.python.org/simple/html2text/); not a file
  Analyzing links from page http://www.aaronsw.com/2002/html2text/
    Skipping link http://www.aaronsw.com/weblog/oldstyle.css (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .css
    Skipping link http://www.aaronsw.com/ (from http://www.aaronsw.com/2002/html2text/); not a file
    Skipping link http://daringfireball.net/projects/markdown/ (from http://www.aaronsw.com/2002/html2text/); not a file
    Skipping link http://html2text.theinfo.org/?url=http://www.aaronsw.com/ (from http://www.aaronsw.com/2002/html2text/); not a file
    Skipping link http://html2text.theinfo.org/?url=http://daringfireball.net/ (from http://www.aaronsw.com/2002/html2text/); not a file
    Skipping link javascript:location.href=%27http://www.aaronsw.com/2002/html2text/?url=%27+document.location.href; (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .href;
    Skipping link http://www.aaronsw.com/2002/html2text/html2text.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link https://github.com/aaronsw/html2text (from http://www.aaronsw.com/2002/html2text/); not a file
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.39.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.38.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.37.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.36.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.35.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.34.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.33.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.32.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.31.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.3.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.292.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.291.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.29.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.28.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.27.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.26.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.25.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.24.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.23.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.21.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.2.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.12.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.11.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.1.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.01a.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-2.0a.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link http://www.aaronsw.com/2002/html2text/html2text-1.0.py (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .py
    Skipping link mailto:me@aaronsw.com (from http://www.aaronsw.com/2002/html2text/); unknown archive format: .com
  Using version 3.200.3 (newest of versions: 3.200.3, 3.200.2, 3.200.1, 3.200.0, 3.101, 3.02, 3.01, 3.1, 2.38, 2.37, 2.35)
  Downloading html2text-3.200.3.tar.gz
  Downloading from URL http://pypi.python.org/packages/source/h/html2text/html2text-3.200.3.tar.gz#md5=98162c467ddafc1a63bff8db98f03d14 (from http://pypi.python.org/simple/html2text/)
  Running setup.py egg_info for package html2text
    running egg_info
    creating pip-egg-info/html2text.egg-info
    writing pip-egg-info/html2text.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/html2text.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/html2text.egg-info/dependency_links.txt
    writing entry points to pip-egg-info/html2text.egg-info/entry_points.txt
    writing manifest file 'pip-egg-info/html2text.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info/html2text.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/html2text.egg-info/SOURCES.txt'
Installing collected packages: html2text
  Found existing installation: html2text 3.200.3
    Uninstalling html2text:
      Removing file or directory /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/html2text-3.200.3-py2.7.egg-info
      Removing file or directory /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/html2text.py
      Removing file or directory /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/html2text.pyc
      Successfully uninstalled html2text
  Running setup.py install for html2text
    Running command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/Users/myusername/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-0.12.0/lib/jekyll/build/html2text/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/w6/tklp0xl92p70zygppdtd8ynh0000gn/T/pip-FdPzxa-record/install-record.txt
    running install
    running build
    running build_py
    creating build
    creating build/lib
    copying html2text.py -> build/lib
    running egg_info
    writing html2text.egg-info/PKG-INFO
    writing top-level names to html2text.egg-info/top_level.txt
    writing dependency_links to html2text.egg-info/dependency_links.txt
    writing entry points to html2text.egg-info/entry_points.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'html2text.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'html2text.egg-info/SOURCES.txt'
    running install_lib
    copying build/lib/html2text.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
    byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/html2text.py to html2text.pyc
    running install_egg_info
    Copying html2text.egg-info to /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/html2text-3.200.3-py2.7.egg-info
    running install_scripts
    Installing html2text script to /Library/Frameworks/Python.framework/Versions/2.7/bin
    error: /Library/Frameworks/Python.framework/Versions/2.7/bin/html2text: Permission denied
    Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/Users/myusername/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-0.12.0/lib/jekyll/build/html2text/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/w6/tklp0xl92p70zygppdtd8ynh0000gn/T/pip-FdPzxa-record/install-record.txt:
    running install

running build

running build_py

creating build

creating build/lib

copying html2text.py -> build/lib

running egg_info

writing html2text.egg-info/PKG-INFO

writing top-level names to html2text.egg-info/top_level.txt

writing dependency_links to html2text.egg-info/dependency_links.txt

writing entry points to html2text.egg-info/entry_points.txt

warning: manifest_maker: standard file '-c' not found



reading manifest file 'html2text.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

writing manifest file 'html2text.egg-info/SOURCES.txt'

running install_lib

copying build/lib/html2text.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/html2text.py to html2text.pyc

running install_egg_info

Copying html2text.egg-info to /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/html2text-3.200.3-py2.7.egg-info

running install_scripts

Installing html2text script to /Library/Frameworks/Python.framework/Versions/2.7/bin

error: /Library/Frameworks/Python.framework/Versions/2.7/bin/html2text: Permission denied

----------------------------------------
  Rolling back uninstall of html2text
  Replacing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/html2text-3.200.3-py2.7.egg-info
  Replacing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/html2text.py
  Replacing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/html2text.pyc
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/Users/myusername/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-0.12.0/lib/jekyll/build/html2text/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/w6/tklp0xl92p70zygppdtd8ynh0000gn/T/pip-FdPzxa-record/install-record.txt failed with error code 1
Exception information:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", line 228, in run
    requirement_set.install(install_options, global_options)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req.py", line 1100, in install
    requirement.install(install_options, global_options)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req.py", line 572, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/__init__.py", line 255, in call_subprocess
    % (command_desc, proc.returncode))
InstallationError: Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/Users/myusername/.rvm/gems/ruby-1.9.3-p429/gems/jekyll-0.12.0/lib/jekyll/build/html2text/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/w6/tklp0xl92p70zygppdtd8ynh0000gn/T/pip-FdPzxa-record/install-record.txt failed with error code 1
4

1 回答 1

3

您似乎没有安装到 /usr/local 的权限。这个是正常的。你可能想要

sudo pip install html2text

反而。

于 2013-05-24T12:47:17.937 回答