pip를 사용하여 goslate를 설치할 때 "goslate.py" 파일의 222번째 줄에 "SyntaxError:잘못된 구문"이 나타납니다.

pip를 사용하여 goslate를 설치할 때 "goslate.py" 파일의 222번째 줄에 "SyntaxError:잘못된 구문"이 나타납니다.

goslate를 설치할 수 없습니다 sudo pip install goslate. 오류 메시지 로그는 다음과 같습니다. 내가 무엇을 놓치고 있나요? 아니면 내 컴퓨터(Debian)에 뭔가 빠진 것이 있나요?

이 패키지는 Python 2에는 설치할 수 있지만 Python 3에는 설치할 수 없습니다.python3 --version: Python 3.2.3 type python3: python3 is hashed (/usr/bin/python3)

    Downloading/unpacking goslate
  Running setup.py egg_info for package goslate
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/home/admin/build/goslate/setup.py", line 8, in <module>
        import goslate as module
      File "goslate.py", line 222
        return tuple(u'' for i in range(len(self._writing))) , unicode(target_language)
                       ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
  File "<string>", line 14, in <module>
  File "/home/admin/build/goslate/setup.py", line 8, in <module>
    import goslate as module
  File "goslate.py", line 222
    return tuple(u'' for i in range(len(self._writing))) , unicode(target_language)
                   ^
SyntaxError: invalid syntax
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/admin/build/goslate
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 104, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 245, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python3/dist-packages/pip/req.py", line 1009, in prepare_files
    req_to_install.run_egg_info()
  File "/usr/lib/python3/dist-packages/pip/req.py", line 225, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/lib/python3/dist-packages/pip/__init__.py", line 256, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in /home/admin/build/goslate

답변1

Python 3.4로 업그레이드해야 합니다.

관련 정보