【问题标题】:python pip install poster gives me error --> Command "python setup.py egg_info" failed with error code 1 in C:\Users\python pip install poster给我错误->命令“python setup.py egg_info”在C:\ Users \中失败,错误代码1
【发布时间】:2019-06-01 16:15:36
【问题描述】:

我正在使用 Python 3,但无法 --> pip 安装海报库

我正在尝试使用海报上传文件。我试过: pip install poster 或 easy_install poster 他们都失败了我得到一个错误:

print "send:", repr(value)
                ^
SyntaxError: invalid syntax

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\...

pip install poster  also tried   

easy_install poster .  

我也尝试过下载 .tar.gz 并得到同样的错误

I have also tried : pip install --upgrade setuptools

【问题讨论】:

标签: python poster


【解决方案1】:

根据第一行代码,poster 似乎只兼容 Python 2。请注意the latest version of this library was published in 2011,因此可能未实现 Python 3 兼容性。

尝试使用其他库或切换到 Python 2。

【讨论】:

  • 你知道我可以使用什么库在 pyhton 3 中上传文件吗?
  • 我真的不确定,this post might help。您上传的文件是否太大而无法加载到内存中?如果不是,您可以使用标准的requestslike so
【解决方案2】:

使用poster3

是 Python3 版本的海报。

【讨论】:

    【解决方案3】:

    对于 Python3,请使用 poster3。参考this

    pip install poster3
    

    【讨论】:

      猜你喜欢
      • 2019-08-10
      • 1970-01-01
      • 2018-12-03
      • 2017-11-04
      • 2020-05-19
      • 1970-01-01
      • 1970-01-01
      • 2015-10-09
      • 2019-01-22
      相关资源
      最近更新 更多