TSP Solvers

旅行商问题求解器.

jvkersch/pyconcorde

cc1f5e0 | Windows 10

Installation

  • 直接安装, 见xbresson/TSP_Transformer.

    1
    pip install -e pyconcorde
    1
    ERROR: pyconcorde is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).
  • 官方安装

    1
    2
    3
    git clone https://github.com/jvkersch/pyconcorde
    cd pycvoncorde
    pip install -e .

    ERROR: No matching distribution found for setuptools

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    Obtaining file:///D:/mine/Github/pyconcorde
    Installing build dependencies ... error
    ERROR: Command errored out with exit status 1:
    command: 'D:\anaconda3\python.exe' 'D:\anaconda3\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Carlos\AppData\Local\Temp\pip-build-env-qv02xdei\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools numpy Cython
    cwd: None
    Complete output (7 lines):
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/setuptools/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/setuptools/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/setuptools/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/setuptools/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/setuptools/
    ERROR: Could not find a version that satisfies the requirement setuptools
    ERROR: No matching distribution found for setuptools
    ----------------------------------------
    WARNING: Discarding file:///D:/mine/Github/pyconcorde. Command errored out with exit status 1: 'D:\anaconda3\python.exe' 'D:\anaconda3\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Carlos\AppData\Local\Temp\pip-build-env-qv02xdei\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools numpy Cython Check the logs for full command output.
    ERROR: Command errored out with exit status 1: 'D:\anaconda3\python.exe' 'D:\anaconda3\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Carlos\AppData\Local\Temp\pip-build-env-qv02xdei\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools numpy Cython Check the logs for full command output.

    更新setuptools, cython, numpy后报错

    qsopt is missing,

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    Obtaining file:///D:/mine/Github/pyconcorde
    Installing build dependencies ... done
    WARNING: Missing build requirements in pyproject.toml for file:///D:/mine/Github/pyconcorde.
    WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'wheel'.
    Getting requirements to build wheel ... done
    Installing backend dependencies ... done
    Preparing wheel metadata ... done
    Requirement already satisfied: numpy>=1.10.0 in d:\anaconda3\lib\site-packages (from pyconcorde==0.1.0) (1.22.2)
    Requirement already satisfied: cython>=0.22.0 in d:\anaconda3\lib\site-packages (from pyconcorde==0.1.0) (0.29.27)
    Installing collected packages: pyconcorde
    Running setup.py develop for pyconcorde
    ERROR: Command errored out with exit status 1:
    command: 'D:\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\mine\\Github\\pyconcorde\\setup.py'"'"'; __file__='"'"'D:\\mine\\Github\\pyconcorde\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
    cwd: D:\mine\Github\pyconcorde\
    Complete output (44 lines):
    running develop
    running egg_info
    writing pyconcorde.egg-info\PKG-INFO
    writing dependency_links to pyconcorde.egg-info\dependency_links.txt
    writing requirements to pyconcorde.egg-info\requires.txt
    writing top-level names to pyconcorde.egg-info\top_level.txt
    reading manifest file 'pyconcorde.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    adding license file 'COPYING'
    running build_ext
    C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\setuptools\command\easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
    warnings.warn(
    C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
    warnings.warn(
    C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\pkg_resources\__init__.py:122: PkgResourcesDeprecationWarning: 4.0.0-unsupported is an invalid version and will not be supported in a future release
    warnings.warn(
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "D:\mine\Github\pyconcorde\setup.py", line 143, in <module>
    setup(
    File "C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\setuptools\__init__.py", line 155, in setup
    return distutils.core.setup(**attrs)
    File "C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
    return run_commands(dist)
    File "C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
    dist.run_commands()
    File "C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
    self.run_command(cmd)
    File "C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
    cmd_obj.run()
    File "C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\setuptools\command\develop.py", line 34, in run
    self.install_for_development()
    File "C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\setuptools\command\develop.py", line 114, in install_for_development
    self.run_command('build_ext')
    File "C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
    File "C:\Users\Carlos\AppData\Local\Temp\pip-build-env-84ozjlf8\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
    cmd_obj.run()
    File "D:\mine\Github\pyconcorde\setup.py", line 114, in run
    download_concorde_qsopt()
    File "D:\mine\Github\pyconcorde\setup.py", line 66, in download_concorde_qsopt
    qsopt_a_url, qsopt_h_url = QSOPT_LOCATION[platform.system()]
    KeyError: 'Windows'
    qsopt is missing, downloading
    ----------------------------------------
    ERROR: Command errored out with exit status 1: 'D:\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\mine\\Github\\pyconcorde\\setup.py'"'"'; __file__='"'"'D:\\mine\\Github\\pyconcorde\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

    疑似线性规划求解器自动安装失败, Concorde Download Information手动下载并安装, 发生报错: 缺少cygwin1.dll.

    安装Cygwin, 并在环境变量中添加C:\cygwin64\bin, 见HOWTO install Cygwin.

    发生报错: 应用程序无法正常启动(0xc000007b).

    注意到Concorde Download Information

    The Windows/Cygwin codes will run under Windows 98/ME/NT/2000/XP if at least the minimal version of the Cygwin environment is installed.

    以及The application was unable to start correctly (0xc000007b)

    Which is a good indication that the 32-bit app tried to load a 64-bit DLL.

    Remy Lebeau

    May 8 '12 at 20:18

    意识到应该装32位版本的Cygwin, 下载安装后环境变量修改为C:\cygwin\bin, 之后运行.exe后跳了个命令行就结束了.


    按照Instructions for installing Concorde安装Concorde, 无法configuremake, 于是按照SETUP / INSTALL安装Chocolatey, 之后choco install make, 仍然无法`make'


    暂时放弃Concorde.