Twyton / 命令 "python setup.py egg_info" 失败,错误代码为 /tmp/pip-install-ui3eeW/twython/
Twyton / Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-ui3eeW/twython/
这是我的问题;(
我用 ist 和我的 raspi pi pip
我安装了这个版本的 pip
”
点子 18.1 来自 /usr/lib/python2.7/dist-packages/pip (python 2.7)
“
pi@adsb:~ $ git clone git://github.com/ryanmcgrath/twython.git
Cloning into 'twython'...
remote: Enumerating objects: 68, done.
remote: Counting objects: 100% (68/68), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 3690 (delta 24), reused 29 (delta 12), pack-reused 3622
Receiving objects: 100% (3690/3690), 2.72 MiB | 3.35 MiB/s, done.
Resolving deltas: 100% (1992/1992), done.
pi@adsb:~ $ cd twython
pi@adsb:~/twython $ python setup.py install
Traceback (most recent call last):
File "setup.py", line 33, in <module>
long_description=open('README.md', encoding='utf-8').read() + '\n\n' +open('HISTORY.md', encoding='utf-8').read (),
TypeError: 'encoding' is an invalid keyword argument for this function
pi@adsb:~/twython $ sudo apt-get install python-setuptools python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-setuptools is already the newest version (40.8.0-1).
python-pip is already the newest version (18.1-5+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
pi@adsb:~/twython $ sudo pip install twython
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting twython
Using cached https://files.pythonhosted.org/packages/b7/2c/fb17cb309fccd4e63638715325768bd959b0ad78b23b0cbc0738f5 fc8c58/twython-3.8.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ui3eeW/twython/setup.py", line 33, in <module>
long_description=open('README.md', encoding='utf-8').read() + '\n\n' +open('HISTORY.md', encoding='utf-8'). read(),
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-ui3eeW/twython/
有什么想法吗?
所以我不能将它用作 twitterclient :(
open('README.md', encoding='utf-8')
encoding
在 Python 3.0 中添加到 open()
。因此代码需要 Python 3+。如果你真的需要 Python 2.7 使用旧的 twython
。版本 3.7.0 似乎没问题:
pip install twython==3.7.0
这是我的问题;( 我用 ist 和我的 raspi pi pip
我安装了这个版本的 pip
” 点子 18.1 来自 /usr/lib/python2.7/dist-packages/pip (python 2.7) “
pi@adsb:~ $ git clone git://github.com/ryanmcgrath/twython.git
Cloning into 'twython'...
remote: Enumerating objects: 68, done.
remote: Counting objects: 100% (68/68), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 3690 (delta 24), reused 29 (delta 12), pack-reused 3622
Receiving objects: 100% (3690/3690), 2.72 MiB | 3.35 MiB/s, done.
Resolving deltas: 100% (1992/1992), done.
pi@adsb:~ $ cd twython
pi@adsb:~/twython $ python setup.py install
Traceback (most recent call last):
File "setup.py", line 33, in <module>
long_description=open('README.md', encoding='utf-8').read() + '\n\n' +open('HISTORY.md', encoding='utf-8').read (),
TypeError: 'encoding' is an invalid keyword argument for this function
pi@adsb:~/twython $ sudo apt-get install python-setuptools python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-setuptools is already the newest version (40.8.0-1).
python-pip is already the newest version (18.1-5+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
pi@adsb:~/twython $ sudo pip install twython
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting twython
Using cached https://files.pythonhosted.org/packages/b7/2c/fb17cb309fccd4e63638715325768bd959b0ad78b23b0cbc0738f5 fc8c58/twython-3.8.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ui3eeW/twython/setup.py", line 33, in <module>
long_description=open('README.md', encoding='utf-8').read() + '\n\n' +open('HISTORY.md', encoding='utf-8'). read(),
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-ui3eeW/twython/
有什么想法吗? 所以我不能将它用作 twitterclient :(
open('README.md', encoding='utf-8')
encoding
在 Python 3.0 中添加到 open()
。因此代码需要 Python 3+。如果你真的需要 Python 2.7 使用旧的 twython
。版本 3.7.0 似乎没问题:
pip install twython==3.7.0