安装 pdfminer3k出错,好像是编码问题,请问怎么解决

来源:5-2 pdfminer3k安装

Eddy_N

2017-09-13 21:30

安装 pdfminer3k出错,好像是编码问题,请问怎么解决

C:\WINDOWS\system32>cd C:\chajian

C:\chajian>cd pdfminer3k

C:\chajian\pdfminer3k>python setup.py install

running install

running bdist_egg

running egg_info

writing dependency_links to pdfminer3k.egg-info\dependency_links.txt

writing top-level names to pdfminer3k.egg-info\top_level.txt

writing requirements to pdfminer3k.egg-info\requires.txt

writing pdfminer3k.egg-info\PKG-INFO

reading manifest file 'pdfminer3k.egg-info\SOURCES.txt'

reading manifest template 'MANIFEST.in'

writing manifest file 'pdfminer3k.egg-info\SOURCES.txt'

installing library code to build\bdist.win-amd64\egg

running install_lib

running build_py

installing scripts to build\bdist.win-amd64\egg\EGG-INFO\scripts

running install_scripts

running build_scripts

copying and adjusting tools\pdf2txt.py -> build\scripts-3.5

Traceback (most recent call last):

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\command\build_scripts.py", line 114, in copy_scripts

    shebang.decode('utf-8')

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 11: invalid start byte


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "setup.py", line 51, in <module>

    'Topic :: Text Processing'

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\core.py", line 148, in setup

    dist.run_commands()

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\dist.py", line 955, in run_commands

    self.run_command(cmd)

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\dist.py", line 974, in run_command

    cmd_obj.run()

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\site-packages\setuptools\command\install.py", line 67, in run

    self.do_egg_install()

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install

    self.run_command('bdist_egg')

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\cmd.py", line 313, in run_command

    self.distribution.run_command(command)

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\dist.py", line 974, in run_command

    cmd_obj.run()

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\site-packages\setuptools\command\bdist_egg.py", line 191, in run

    no_ep=1)

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\site-packages\setuptools\command\bdist_egg.py", line 147, in call_command

    self.run_command(cmdname)

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\cmd.py", line 313, in run_command

    self.distribution.run_command(command)

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\dist.py", line 974, in run_command

    cmd_obj.run()

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\site-packages\setuptools\command\install_scripts.py", line 21, in run

    orig.install_scripts.run(self)  # run first to set up self.outfiles

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\command\install_scripts.py", line 43, in run

    self.run_command('build_scripts')

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\cmd.py", line 313, in run_command

    self.distribution.run_command(command)

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\dist.py", line 974, in run_command

    cmd_obj.run()

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\command\build_scripts.py", line 50, in run

    self.copy_scripts()

  File "C:\Users\name\AppData\Local\Programs\Python\Python35\lib\distutils\command\build_scripts.py", line 118, in copy_scripts

    "from utf-8".format(shebang))

ValueError: The shebang (b'#!C:\\Users\\\xc0\xcb\xc0\xcb\xc9\xa7\xc9\xa7\\AppData\\Local\\Programs\\Python\\Python35\\python.exe\n') is not decodable from utf-8

C:\chajian\pdfminer3k>


写回答 关注

1回答

  • Qfish
    2017-09-15 17:55:30

    这个库可能不支持python2

python遇见数据采集

本教程让你初步掌握Python进行数据采集,创造属于你的价值

59669 学习 · 200 问题

查看课程

相似问题