首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ValueError:未知的url类型:'LanguageTool-3.2.zip‘

ValueError:未知的url类型:'LanguageTool-3.2.zip‘
EN

Stack Overflow用户
提问于 2021-11-26 11:13:02
回答 1查看 35关注 0票数 0

我正在尝试安装pycontractions库,它依赖于语言检查库。因此,当安装语言检查时,我得到以下错误

代码语言:javascript
复制
ValueError: unknown url type: 'LanguageTool-3.2.zip

我已经安装了python-3.10和java-8。当我使用pip install language-check时,我得到了urllib.error.HTTPError: HTTP Error 403: Forbidden,因此,我手动下载了语言工具(按照github链接中的说明),并运行以下命令:

代码语言:javascript
复制
pip install git+https://github.com/myint/language-check

我尝试了所有可能的方法,但仍然不能解决这个问题。它安装在mac上没有任何问题,但我是一个windows用户。所以我需要把它安装在我的windows桌面上。错误:

代码语言:javascript
复制
Collecting git+https://github.com/myint/language-check.git
  Cloning https://github.com/myint/language-check.git to c:\users\skamble\appdata\local\temp\pip-req-build-c78lrf2e
  Running command git clone --filter=blob:none -q https://github.com/myint/language-check.git 'C:\Users\skamble\AppData\Local\Temp\pip-req-build-c78lrf2e'
  Resolved https://github.com/myint/language-check.git to commit 58e419833ef28a9193fcaa21193616a8a14504a9
  Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for language-check, since package 'wheel' is not installed.
Installing collected packages: language-check
    Running setup.py install for language-check ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\skamble\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\skamble\\AppData\\Local\\Temp\\pip-req-build-c78lrf2e\\setup.py'"'"'; __file__='"'"'C:\\Users\\skamble\\AppData\\Local\\Temp\\pip-req-build-c78lrf2e\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\skamble\AppData\Local\Temp\pip-record-msctmso8\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\skamble\AppData\Local\Programs\Python\Python310\Include\language-check'
         cwd: C:\Users\skamble\AppData\Local\Temp\pip-req-build-c78lrf2e\
    Complete output (23 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\skamble\AppData\Local\Temp\pip-req-build-c78lrf2e\setup.py", line 595, in <module>
        sys.exit(main())
      File "C:\Users\skamble\AppData\Local\Temp\pip-req-build-c78lrf2e\setup.py", line 590, in main
        run_setup_hooks(config)
      File "C:\Users\skamble\AppData\Local\Temp\pip-req-build-c78lrf2e\setup.py", line 561, in run_setup_hooks
        language_tool_hook(config)
      File "C:\Users\skamble\AppData\Local\Temp\pip-req-build-c78lrf2e\setup.py", line 584, in language_tool_hook
        download_lt()
      File "C:\Users\skamble\AppData\Local\Temp\pip-req-build-c78lrf2e\download_lt.py", line 131, in download_lt
        with closing(urlopen(url)) as u:
      File "C:\Users\skamble\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 216, in urlopen
        return opener.open(url, data, timeout)
      File "C:\Users\skamble\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 503, in open
        req = Request(fullurl, data)
      File "C:\Users\skamble\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 322, in __init__
        self.full_url = url
      File "C:\Users\skamble\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 348, in full_url
        self._parse()
      File "C:\Users\skamble\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 377, in _parse
        raise ValueError("unknown url type: %r" % self.full_url)
    ValueError: unknown url type: 'LanguageTool-3.2.zip'
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\skamble\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\skamble\\AppData\\Local\\Temp\\pip-req-build-c78lrf2e\\setup.py'"'"'; __file__='"'"'C:\\Users\\skamble\\AppData\\Local\\Temp\\pip-req-build-c78lrf2e\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\skamble\AppData\Local\Temp\pip-record-msctmso8\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\skamble\AppData\Local\Programs\Python\Python310\Include\language-check' Check the logs for full command output.
EN

回答 1

Stack Overflow用户

发布于 2021-11-29 21:44:57

我解决了这个问题。使用了git+https://github.com/coreyryanhanson/language-check,并且它起作用了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70123519

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档