为什么不能通过pip安装python-sat?

问题描述 投票:-2回答:1

我正在尝试使用pyton-sat在Windows上安装pip,结果如下:

D:\pytools\Anaconda3\Scripts>pip install python-sat
Collecting python-sat
  Using cached https://files.pythonhosted.org/packages/3a/4d/2b121fc0b6224112c932863c7b83e87e5f86c1f44d00d0531581da044525/python-sat-0.1.5.dev10.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\qiyun\AppData\Local\Temp\pip-install-lbrim7nm\python-sat\setup.py", line 127, in <module>
        with chdir(solver):
      File "D:\pytools\Anaconda3\lib\contextlib.py", line 112, in __enter__
        return next(self.gen)
      File "C:\Users\qiyun\AppData\Local\Temp\pip-install-lbrim7nm\python-sat\setup.py", line 42, in chdir
        os.chdir(new_dir)
    FileNotFoundError: [WinError 2] : 'cadical'
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\qiyun\AppData\Local\Temp\pip-install-lbrim7nm\python-sat\
python pip
1个回答
0
投票

[查看this,看来问题在于19.0.1中存在一个错误,导致.dist-info目录嵌套,请参见here。假设您正在使用此pip版本,则此问题的解决方案是升级pip版本。通过使用命令19.0.1,验证您的点子版本确实为pip --version

要升级pip,请使用以下命令:python -m pip install --upgrade pip

© www.soinside.com 2019 - 2024. All rights reserved.