Closed ryan0802 closed 5 years ago
Just curious how you managed to run it on Python 2.7
bismarckturm@bismarckturm01:~/training/wikidata$ git clone https://github.com/dahlia/wikidata.git 'wikidata'에 복제합니다... remote: Counting objects: 507, done. remote: Total 507 (delta 0), reused 0 (delta 0), pack-reused 507 오브젝트를 받는 중: 100% (507/507), 131.10 KiB | 0 bytes/s, 완료. 델타를 알아내는 중: 100% (346/346), 완료. 연결을 확인하는 중입니다... 완료. bismarckturm@bismarckturm01:~/training/wikidata$ ll 합계 12 drwxrwxr-x 3 bismarckturm bismarckturm 4096 8월 27 10:16 ./ drwxrwxr-x 5 bismarckturm bismarckturm 4096 8월 27 10:16 ../ drwxrwxr-x 6 bismarckturm bismarckturm 4096 8월 27 10:16 wikidata/ bismarckturm@bismarckturm01:~/training/wikidata$ cd wikidata/ bismarckturm@bismarckturm01:~/training/wikidata/wikidata$ python setup.py build running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/wikidata copying wikidata/multilingual.py -> build/lib.linux-x86_64-2.7/wikidata copying wikidata/datavalue.py -> build/lib.linux-x86_64-2.7/wikidata copying wikidata/client.py -> build/lib.linux-x86_64-2.7/wikidata copying wikidata/commonsmedia.py -> build/lib.linux-x86_64-2.7/wikidata copying wikidata/init.py -> build/lib.linux-x86_64-2.7/wikidata copying wikidata/entity.py -> build/lib.linux-x86_64-2.7/wikidata copying wikidata/cache.py -> build/lib.linux-x86_64-2.7/wikidata bismarckturm@bismarckturm01:~/training/wikidata/wikidata$ sudo python setup.py install [sudo] password for bismarckturm: running install running bdist_egg running egg_info creating Wikidata.egg-info writing requirements to Wikidata.egg-info/requires.txt writing Wikidata.egg-info/PKG-INFO writing top-level names to Wikidata.egg-info/top_level.txt writing dependency_links to Wikidata.egg-info/dependency_links.txt writing manifest file 'Wikidata.egg-info/SOURCES.txt' reading manifest file 'Wikidata.egg-info/SOURCES.txt' writing manifest file 'Wikidata.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/wikidata copying build/lib.linux-x86_64-2.7/wikidata/multilingual.py -> build/bdist.linux-x86_64/egg/wikidata copying build/lib.linux-x86_64-2.7/wikidata/datavalue.py -> build/bdist.linux-x86_64/egg/wikidata copying build/lib.linux-x86_64-2.7/wikidata/client.py -> build/bdist.linux-x86_64/egg/wikidata copying build/lib.linux-x86_64-2.7/wikidata/commonsmedia.py -> build/bdist.linux-x86_64/egg/wikidata copying build/lib.linux-x86_64-2.7/wikidata/init.py -> build/bdist.linux-x86_64/egg/wikidata copying build/lib.linux-x86_64-2.7/wikidata/entity.py -> build/bdist.linux-x86_64/egg/wikidata copying build/lib.linux-x86_64-2.7/wikidata/cache.py -> build/bdist.linux-x86_64/egg/wikidata byte-compiling build/bdist.linux-x86_64/egg/wikidata/multilingual.py to multilingual.pyc File "build/bdist.linux-x86_64/egg/wikidata/multilingual.py", line 17 def init(self, texts: Mapping[Union[Locale, str], str]) -> None: ^ SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/wikidata/datavalue.py to datavalue.pyc File "build/bdist.linux-x86_64/egg/wikidata/datavalue.py", line 46 def str(self) -> str: ^ SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/wikidata/client.py to client.pyc File "build/bdist.linux-x86_64/egg/wikidata/client.py", line 86 base_url: str=WIKIDATA_BASE_URL, ^ SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/wikidata/commonsmedia.py to commonsmedia.pyc File "build/bdist.linux-x86_64/egg/wikidata/commonsmedia.py", line 23 def init(self, client: Client, title: str) -> None: ^ SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/wikidata/init.py to init.pyc byte-compiling build/bdist.linux-x86_64/egg/wikidata/entity.py to entity.pyc File "build/bdist.linux-x86_64/egg/wikidata/entity.py", line 29 def init(self, attribute: str) -> None: ^ SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/wikidata/cache.py to cache.pyc File "build/bdist.linux-x86_64/egg/wikidata/cache.py", line 28 def get(self, key: CacheKey) -> Optional[CacheValue]: ^ SyntaxError: invalid syntax
creating build/bdist.linux-x86_64/egg/EGG-INFO copying Wikidata.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying Wikidata.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying Wikidata.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying Wikidata.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying Wikidata.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/Wikidata-0.6.1-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing Wikidata-0.6.1-py2.7.egg Copying Wikidata-0.6.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages Adding Wikidata 0.6.1 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/Wikidata-0.6.1-py2.7.egg Processing dependencies for Wikidata==0.6.1 Searching for typing Reading https://pypi.org/simple/typing/ Downloading https://files.pythonhosted.org/packages/cc/3e/29f92b7aeda5b078c86d14f550bf85cff809042e3429ace7af6193c3bc9f/typing-3.6.6-py2-none-any.whl#sha256=a4c8473ce11a65999c8f59cb093e70686b6c84c98df58c1dae9b3b196089858a Best match: typing 3.6.6 Processing typing-3.6.6-py2-none-any.whl Installing typing-3.6.6-py2-none-any.whl to /usr/local/lib/python2.7/dist-packages Adding typing 3.6.6 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/typing-3.6.6-py2.7.egg Searching for Babel>=2.0 Reading https://pypi.org/simple/Babel/ Downloading https://files.pythonhosted.org/packages/b8/ad/c6f60602d3ee3d92fbed87675b6fb6a6f9a38c223343ababdb44ba201f10/Babel-2.6.0-py2.py3-none-any.whl#sha256=6778d85147d5d85345c14a26aada5e478ab04e39b078b0745ee6870c2b5cf669 Best match: Babel 2.6.0 Processing Babel-2.6.0-py2.py3-none-any.whl Installing Babel-2.6.0-py2.py3-none-any.whl to /usr/local/lib/python2.7/dist-packages writing requirements to /usr/local/lib/python2.7/dist-packages/Babel-2.6.0-py2.7.egg/EGG-INFO/requires.txt Adding Babel 2.6.0 to easy-install.pth file Installing pybabel script to /usr/local/bin
Installed /usr/local/lib/python2.7/dist-packages/Babel-2.6.0-py2.7.egg Searching for pytz==2014.10 Best match: pytz 2014.10 Adding pytz 2014.10 to easy-install.pth file
Using /usr/lib/python2.7/dist-packages Finished processing dependencies for Wikidata==0.6.1 bismarckturm@bismarckturm01:~/training/wikidata/wikidata$ ipython Python 2.7.12 (default, Dec 4 2017, 14:50:18) Type "copyright", "credits" or "license" for more information.
IPython 2.4.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details.
In [1]: from wikidata.client import Client File "wikidata/client.py", line 86 base_url: str=WIKIDATA_BASE_URL, ^ SyntaxError: invalid syntax
This project does not support Python 2, and has no plan to do, since it will retire soon.
Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.