繁体   English   中英

无法在Git Bash中安装python软件包

[英]Cannot install python package in Git Bash

我正在尝试从公司内部工件存储中安装软件包。 我在Gitbash中遇到2个无法理解的异常。 当我运行Pip Freeze时,看不到安装包,因此我不认为该软件包已经安装。

看完异常之后,我不知道发生了什么,有人熟悉吗?

pip install --no-dependencies --user -i https://artifactory.cloud.company.com/artifactory/api/pypi/pypi-python-org/simple git+https://github.kdc.company.com/MandR/package.git
Looking in indexes: https://artifactory.cloud.company.com/artifactory/api/pypi/pypi-python-org/simple
Collecting git+https://github.kdc.company.com/MandR/package.git
  Cloning https://github.kdc.company.com/MandR/package.git to c:\users\user_name\appdata\local\temp\pip-req-build-ptb41on4
Exception:
Traceback (most recent call last):
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\req\req_install.py", line 339, in check_if_exists
    self.satisfied_by = pkg_resources.get_distribution(str(no_marker))
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 476, in get_distribution
    dist = get_provider(dist)
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 352, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 895, in require
    needed = self.resolve(parse_requirements(requirements))
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 786, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pip._vendor.pkg_resources.ContextualVersionConflict: (tables 3.4.3 (c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages), Requirement.parse('tables==3.2.0'), {'package'})

在处理上述异常期间,发生了另一个异常:

Traceback (most recent call last):
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\cli\base_command.py", line 143, in main
    status = self.run(options, args)
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 318, in run
    resolver.resolve(requirement_set)
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\resolve.py", line 102, in resolve
    self._resolve_one(requirement_set, req)
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\resolve.py", line 256, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\resolve.py", line 221, in _get_abstract_dist_for
    req.check_if_exists(self.use_user_site)
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_internal\req\req_install.py", line 350, in check_if_exists
    self.req.name
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 476, in get_distribution
    dist = get_provider(dist)
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 352, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 895, in require
    needed = self.resolve(parse_requirements(requirements))
  File "c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 786, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pip._vendor.pkg_resources.ContextualVersionConflict: (tables 3.4.3 (c:\users\user_name\appdata\local\continuum\anaconda3\lib\site-packages), Requirement.parse('tables==3.2.0'), {'package'})

您似乎安装了错误的tables包版本。 尝试使用pip install tables==3.2.0安装所需的版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM