[英]PIP Install lpod fails Error 1 and Invalid Syntax
我有Debian / Cinnamon,我正尝试安装python lpod-python软件包,以便可以从Python 3.4打开LibreOffice文件。 还安装了Python 2.7和Idle 3。
当我尝试
pip3 install lpod-python
它失败。 我已经阅读了pip install的所有其他答案,错误代码为1,并且我确定pip和setuptools已正确安装并且是最新的,所以还有其他问题。
ed@eddebian:~$ pip3 install lpod-python
Downloading/unpacking lpod-python
Downloading lpod-python-1.1.6.tar.gz (1.6MB): 1.6MB downloaded
Running setup.py (path:/tmp/pip-build-r0wgfnfi/lpod-python/setup.py) egg_info for package lpod-python
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-r0wgfnfi/lpod-python/setup.py", line 35, in <module>
from release import has_git, get_release
File "/tmp/pip-build-r0wgfnfi/lpod-python/release.py", line 92
print get_release()
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-r0wgfnfi/lpod-python/setup.py", line 35, in <module>
from release import has_git, get_release
File "/tmp/pip-build-r0wgfnfi/lpod-python/release.py", line 92
print get_release()
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-r0wgfnfi/lpod-python
接下来,我尝试从git克隆lpod并从命令行运行setup.py。 我收到相同的语法错误,但没有错误代码1。
我目前有一种解决方法,可以将.odt文件转换为文本,但是如果我可以将它们直接读入python,它将大大提高我的生产率。 任何帮助将不胜感激。
该代码仅适用于Python 2; 该库显然与Python 3不兼容。
您的项目使用的是Python 3还是Python 2.6? 如果使用Python 2.6,只需执行
pip install lpod-python
如果它使用Python 3,则不能使用该库,因为它与Python 3不兼容,您可以通过
print get_release()
显示为语法错误,因为print()是Python3的正确语法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.