windows上的python语言检查

2024-04-25 14:39:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着用

pip install --user --upgrade language-check

然后我得到这里提到的问题。在

^{pr2}$

解决方案是基于苹果的,现在是windows,使用sudo。我尝试以管理员的身份打开命令行并运行pip命令,但仍然存在相同的问题。如果你能提供一些见解,我将不胜感激。在

我跑了

pip install--用户--升级语言检查

然后响应命令

Collecting language-check
  Using cached language-check-0.7.2.tar.gz
Installing collected packages: language-check
  Running setup.py install for language-check
    Complete output from command C:\Python27\python.exe -c "import setuptools, t
okenize;__file__='c:\\users\\ryan\\appdata\\local\\temp\\pip-build-bn8yq0\\langu
age-check\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read
().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\ryan\app
data\local\temp\pip-m78aoq-record\install-record.txt --single-version-externally
-managed --compile --user:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\ryan\appdata\local\temp\pip-build-bn8yq0\language-check\set
up.py", line 597, in <module>
        sys.exit(main())
      File "c:\users\ryan\appdata\local\temp\pip-build-bn8yq0\language-check\set
up.py", line 592, in main
        run_setup_hooks(config)
      File "c:\users\ryan\appdata\local\temp\pip-build-bn8yq0\language-check\set
up.py", line 562, in run_setup_hooks
        default_hook(config)
      File "c:\users\ryan\appdata\local\temp\pip-build-bn8yq0\language-check\set
up.py", line 574, in default_hook
        generate_py2k(config)
      File "c:\users\ryan\appdata\local\temp\pip-build-bn8yq0\language-check\set
up.py", line 542, in generate_py2k
        run_3to2(copied_py_files)
      File "c:\users\ryan\appdata\local\temp\pip-build-bn8yq0\language-check\set
up.py", line 375, in run_3to2
        raise OSError('3to2 script is unavailable.')
    OSError: 3to2 script is unavailable.

    ----------------------------------------
Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\us
ers\\ryan\\appdata\\local\\temp\\pip-build-bn8yq0\\language-check\\setup.py';exe
c(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n')
, __file__, 'exec'))" install --record c:\users\ryan\appdata\local\temp\pip-m78a
oq-record\install-record.txt --single-version-externally-managed --compile --use
r" failed with error code 1 in c:\users\ryan\appdata\local\temp\pip-build-bn8yq0
\language-check

Tags: installpipinpybuildlocalcheckline