我是github的新手,我試圖安裝unicodecsv(https://github.com/jdunck/python-unicodecsv)。爲Python安裝unicode csv?
我想
sudo pip install -e git://github.com/jdunck/python-unicodecsv.git#egg=unicodecsv
但我發現了一個錯誤信息。我可能在做一個基本錯誤的人,有人可以幫忙嗎?
Obtaining unicodecsv from git+git://github.com/jdunck/python-unicodecsv.git#egg=unicodecsv
Cloning git://github.com/jdunck/python-unicodecsv.git to ./src/unicodecsv
Running setup.py egg_info for package unicodecsv
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/dave/Dropbox/Promoter/working/src/unicodecsv/setup.py", line 5, in <module>
version = __import__('unicodecsv').__version__
File "unicodecsv/__init__.py", line 49
except TypeError, e:
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/dave/Dropbox/Promoter/working/src/unicodecsv/setup.py", line 5, in <module>
version = __import__('unicodecsv').__version__
File "unicodecsv/__init__.py", line 49
except TypeError, e:
^
SyntaxError: invalid syntax
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /Users/dave/.pip/pip.log
Davids-MacBook-Air:working dave$ sudo pip install -e git://github.com/jdunck/python-unicodecsv.git#egg=unicodecsv
Obtaining unicodecsv from git+git://github.com/jdunck/python-unicodecsv.git#egg=unicodecsv
Updating ./src/unicodecsv clone
^[ Running setup.py egg_info for package unicodecsv
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/dave/Dropbox/Promoter/working/src/unicodecsv/setup.py", line 5, in <module>
version = __import__('unicodecsv').__version__
File "unicodecsv/__init__.py", line 49
except TypeError, e:
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/dave/Dropbox/Promoter/working/src/unicodecsv/setup.py", line 5, in <module>
version = __import__('unicodecsv').__version__
File "unicodecsv/__init__.py", line 49
except TypeError, e:
^
SyntaxError: invalid syntax
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /Users/dave/.pip/pip.log
您使用的是什麼版本的Python?或者,特別是,什麼版本的Python是您的'PATH'上的第一個'pip'命令? – abarnert
另外,出於好奇,你爲什麼要安裝這個關閉github,而不是隻安裝最新發布的版本在PyPI與'pip install unicodecsv'? – abarnert
1)Python 2.7.2。 2)pip安裝unicodecsv給我同樣的錯誤。 –