Когда я собираюсь установить модуль, он всегда выдает ошибку - PullRequest
0 голосов
/ 10 января 2020

Когда я собираюсь установить модуль, он всегда выдает ошибку. Это ошибка:

pip install turtle
Collecting turtle
  Using cached https://files.pythonhosted.org/packages/ff/f0/21a42e9e424d24bdd0e509d5ed3c7dfb8f47d962d9c044dba903b0b4a26f/turtle-0.0.2.tar.gz
Note: you may need to restart the kernel to use updated packages.
    ERROR: Command errored out with exit status 1:
     command: 'C:\ProgramData\Anaconda3\pythonw.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\INUKAS~1\\AppData\\Local\\Temp\\pip-install-9aznr_o3\\turtle\\setup.py'"'"'; __file__='"'"'C:\\Users\\INUKAS~1\\AppData\\Local\\Temp\\pip-install-9aznr_o3\\turtle\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\INUKAS~1\AppData\Local\Temp\pip-install-9aznr_o3\turtle\
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\INUKAS~1\AppData\Local\Temp\pip-install-9aznr_o3\turtle\setup.py", line 40
        except ValueError, ve:
                         ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

1 Ответ

0 голосов
/ 10 января 2020

Попробуйте обновить pip и setuptools:

python -m pip install --upgrade pip

pip install --upgrade setuptools

Теперь попробуйте установить модуль, используя:

pip install "package-name"
...