FAQs
Installation and Licensing Configuration Related
Q: What is the reason for the error
invalid username
when configuring the license?A: This error indicates that the username was incorrectly filled in when applying, and you can re-fill the form with the correct username to apply. For information on how to obtain username under different operating systems, please refer to the Solver COPT application page, please remark in the application reason with “The username is incorrectly filled in, reapply” . we will issue new license for the correct username.
Q: After downloading COPT, an antivirus software installed on the computer reports a virus and automatically isolates it.
A: The COPT software downloaded from the COPT official download link is the official version, which has not been developed with any suspicious virus behavior. It can be determined that the anti-virus software is falsely reporting. Please temporarily close the anti-virus software before downloading it.
Q: After validating the license (executing
copt_licgen -v
), it reports an error:Missing Files
orInvalid Signature
.A: This type of error indicates that the license file configuration fails. Please refer to Installation Instructions: Configuring License File to check whether the steps for configuring the license file are correctly followed. Common reasons are as follows:
The license file in the current working directory is not compatible with the version of COPT (for example: the license is version 4.0, while the COPT is version 5.0), please check the
VERSION
in"license.dat"
to confirm whether the major version is the same, if not, please go to the Solver COPT application page to re-apply, and we will issue you the latest license.In Windows system, if the COPT software is installed in the system disk (usually
C
) in a non-user directory (eg: the default installation path"C:\Program Files\copt60"
, you need to open the command line window with administrator privileges and execute the license acquisition commandcopt_licgen
again.
Q: I have already installed an old version of the COPT Python interface (
coptpy
), how do I upgrade to the new version?A: Please enter:
pip install --upgrade coptpy
in the terminal.
Q: In the Python IDE, when debugging, a variable
not defined
warning is reported, or a wavy line appears below the variable in the code, what is the reason?A: Currently
coptpy
supports type hints, please enterpip install coptpy-stubs
in the terminal to download and installcoptpy-stubs
to solve this problem. After successfully installed, in the IDE when writing code in, you will be prompted for variable name completion and possible values for function parameters.
MacOS System
Q: When calling
coptpy
on MacOS, an error is reported:ImportError: from .coptpywrap import * symbol not found in flat namespace
.A: This error is due to the mismatch between
coptpy
and Anaconda’s architecture on MacOS. Such ascoptpy
is the M1 version, and Anaconda is the x86 version, you can install the M1 version of Anaconda to solve this problem.
Q: When the license is configured in the MacOS system, the
copt_licgen
command is executed in the terminal, and an error is reported:command not found: copt_licgen
.A: This error is because the relevant environment variables of COPT are not configured. In the MacOS system, you need to configure the environment variables after installing COPT. Please refer to Installation Instructions: MacOS System chapter to obtain detailed installation instructions.
Q: When manually configuring environment variables, I copy content directly from the document to
.zshrc
file or.bash_profile
file, causing the configuration to fail.A: Due to the document encoding problem, the above environment variables cannot be directly copied to the corresponding file, and the contents of the environment variables need to be manually entered.
Windows System
Q: In Windows system, when executing
copt_licgen
to generate the license file, an error is reported that the license file cannot be written to the hard disk, and the error message is:error opening file
.A: If the COPT software is installed in the system disk (usually
C
) in a non-user directory (eg: the default installation path"C:\Program Files\copt60"
), y you need to open the command line window with administrator privileges and execute the license acquisition commandcopt_licgen
, in order to normally write the license file to theC
drive. Administrator privileges are not required to execute permission acquisition commands under user directories such as"C:\Users\shanshu"
.
Q: In Windows system, when installing COPT Python interface via command
pip install coptpy
, an error is displayed:could not find a version, no matching distribution
, what is the reason?A: Please do not use Python installed through Microsoft Store, it is recommended to download from Anaconda distribution or Python official distribution Download Python.
Q: In Windows system, when installing COPT Python interface through COPT installation package (
python setup.py install
), an errorcould not create build: access denied
is reported.A: If COPT is installed in the system disk (usually
C
) in a non-user directory (eg: the default installation path"C:\Program Files\copt60"
, you need to first Open the command line window with administrator privileges and execute the commandpython setup.py install
.
Modeling and Solving Functions Related
Q: How to deal with the situation where the model is not feasible?
A: COPT provides functions to calculate IIS and feasible relaxation to analyze the reasons for model infeasibility: Computing IIS will obtain the minimum set of infeasible constraints and variables, and feasibility relaxation attempts to make the model feasible with minimal changes. Please see the Infeasible Model Handling chapter for details.