Installation
Installation from PyPi
This is the easiest way of installing PySCP3.
Note that you need first Python 3 (version 3.6, or later) to be installed. You can do it, for example, from python.org
Installing PyCSP3 (Linux)
Check if ‘pip3’ is installed. If it is not the case, execute:
sudo apt install python3-pip
Then, install PyCSP3 with the command ‘pip3’:
sudo pip3 install pycsp3
For using the -solve or -solver options, you need to have Java (at least, version 11) installed:
sudo apt-get install openjdk-11-jdk
Installing PyCSP3 (Mac OS)
If Python 3 is installed on your system, the command ‘pip3’ should already be present.
Install PyCSP3 with the command ‘pip3’:
sudo pip3 install pycsp3
For using the -solve or -solver options, you need to have Java (at least, version 11) installed.
Installing PyCSP3 (Windows)
You may need to upgrade ‘pip’. Open the console and type:
python -m pip install --upgrade pip
Then, for installing PyCSP3, type:
python -m pip install pycsp3
For using the -solve or -solver options, you need to install (at least) Java version 11:
https://www.oracle.com/java/technologies/javase-downloads.html
And add in the PATH the java command, for example, temporally, with the command:
set path=%path%;C:/Program Files/Java/jdk-14.0.1/bin/
You can check the java command by typing in your console:
java --version
Updating the Version of PyCSP3 (for PyPi)
For updating your version of PyCSP3, simply execute:
For linux/Mac:
sudo pip3 install --upgrade pycsp3
For Windows:
python -m pip install --upgrade pycsp3
Installation (alternative) by Cloning from GitHub
An alternative to Pypi is to clone the code from GitHub. Here is an illustration for MAC OS. We assume that Python 3 is installed (otherwise, type port install python38
for example), and consequently ‘pip3’ is also installed. In a console, type:
git clone https://github.com/xcsp3team/pycsp3.git
pip3 install lxml
You may need to update the environment variable ‘PYTHONPATH’, by typing for example:
export PYTHONPATH=$PYTHONPATH:.