hark-lib (Package Installation) for v.2.x

Support Environments

  • Target platform
    • manylinux_2_28_x86_64 — Linux distributions with glibc>=2.28 or later.
    • Python3.9 or later — Python version supported by NumPy>=2.0.

For other environments, please use the source compilation.
 

Installation

Note: Items with a triangle bullet character can be opened or closed.
 

If it has already been activated into a virtual environment such as pyenv, virtualenv, or venv.

# This is assumed that the python and pip commands are already available.

# Upgrade pip (Package Installer for Python) and setuptools
# Note: If you see the following message, please update pip:
# ERROR: Could not find a version that satisfies the requirement hark-lib (from versions: none)
# ERROR: No matching distribution found for hark-lib
#pip install --upgrade pip setuptools

# Install PyHARK
pip install hark-lib hark-lib-core hark-modules-std hark-modules-matplotlib hark-modules-kivy hark-modules-dlssl hark-tool --trusted-host archive.hark.jp --extra-index-url http://archive.hark.jp/whl/

# Optionally, install PyHARK for the GPU-enabled package (Currently only for nvidia GPUs.)
pip install hark-lib-gpu --trusted-host archive.hark.jp --extra-index-url http://archive.hark.jp/whl/
An example of environment setup for Ubuntu 20.04 users.

(You must need to prepare an environment where python 3.9 can be run.)

# Install python3.9
sudo apt update
sudo apt upgrade
sudo apt install python3.9-full python3.9-dev

# Create your python virtual environment
python3.9 -m venv YOUR_ENVIRONMENT_NAME

# Activate your python virtual environment
# Note: When using PyHARK, you need to activate the virtual environment specified here.
source YOUR_ENVIRONMENT_NAME/bin/activate

# Upgrade pip (Package Installer for Python) and setuptools
# Note: You will need to update pip to install packages based on PEP 600.
# https://peps.python.org/pep-0600/
# If you don't run it, you'll see a message like this:
# ERROR: Could not find a version that satisfies the requirement hark-lib (from versions: none)
# ERROR: No matching distribution found for hark-lib
pip install --upgrade pip setuptools

# Install PyHARK
pip install hark-lib hark-lib-core hark-modules-std hark-modules-matplotlib hark-modules-kivy hark-modules-dlssl hark-tool --trusted-host archive.hark.jp --extra-index-url http://archive.hark.jp/whl/

# Optionally, install PyHARK for the GPU-enabled package (Currently only for nvidia GPUs.)
pip install hark-lib-gpu --trusted-host archive.hark.jp --extra-index-url http://archive.hark.jp/whl/

# Deactivate your python virtual environment
# Note: When you are finished using PyHARK, deactivate it virtual environment and exit.
deactivate

An example of environment setup for Ubuntu 22.04 or later users.

# Install python3.x
sudo apt update
sudo apt upgrade
sudo apt install python3-venv

# Create your python virtual environment
python3 -m venv YOUR_ENVIRONMENT_NAME

# Activate your python virtual environment
# Note: When using PyHARK, you need to activate the virtual environment specified here.
source YOUR_ENVIRONMENT_NAME/bin/activate

# Upgrade pip (Package Installer for Python) and setuptools
# Note: You will need to update pip to install packages based on PEP 600.
# https://peps.python.org/pep-0600/
pip install --upgrade pip setuptools

# Install PyHARK
pip install hark-lib hark-lib-core hark-modules-std hark-modules-matplotlib hark-modules-kivy hark-modules-dlssl hark-tool --trusted-host archive.hark.jp --extra-index-url http://archive.hark.jp/whl/

# Optionally, install PyHARK for the GPU-enabled package (Currently only for nvidia GPUs.)
pip install hark-lib-gpu --trusted-host archive.hark.jp --extra-index-url http://archive.hark.jp/whl/

# Deactivate your python virtual environment
# Note: When you are finished using PyHARK, deactivate it virtual environment and exit.
deactivate

An example of environment setup for glibc>=2.28 linux distribution (e.g. Debian 10 : buster) users.

(You must need to prepare an environment where python 3.9 or later can be run.)

# Install python3.9 or later
sudo apt update
sudo apt upgrade
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev
wget https://www.python.org/ftp/python/3.9.25/Python-3.9.25.tgz
tar -xvf Python-3.9.25.tgz
cd Python-3.9.25/
./configure --enable-optimizations
make -j 2
sudo make altinstall
cd ~/

# Create your python virtual environment
python3.9 -m venv YOUR_ENVIRONMENT_NAME

# Activate your python virtual environment
# Note: When using PyHARK, you need to activate the virtual environment specified here.
source YOUR_ENVIRONMENT_NAME/bin/activate

# Upgrade pip (Package Installer for Python) and setuptools
# Note: You will need to update pip to install packages based on PEP 600.
# https://peps.python.org/pep-0600/
# If you don't run it, you'll see a message like this:
# ERROR: Could not find a version that satisfies the requirement hark-lib (from versions: none)
# ERROR: No matching distribution found for hark-lib
# If you are using the latest patch version (the version with the highest last digit in the version number), you may not need to do this.
#pip install --upgrade pip setuptools

# Install PyHARK
pip install hark-lib hark-lib-core hark-modules-std hark-modules-matplotlib hark-modules-kivy hark-modules-dlssl hark-tool --trusted-host archive.hark.jp --extra-index-url http://archive.hark.jp/whl/

# Optionally, install PyHARK for the GPU-enabled package (Currently only for nvidia GPUs.)
pip install hark-lib-gpu --trusted-host archive.hark.jp --extra-index-url http://archive.hark.jp/whl/

# Deactivate your python virtual environment
# Note: When you are finished using PyHARK, deactivate it virtual environment and exit.
deactivate

 

Uninstallation

# Specify the package name to uninstall with the "pip uninstall" command.
pip uninstall hark-lib hark-lib-core hark-modules-std hark-modules-matplotlib hark-modules-kivy hark-modules-dlssl hark-tool
# If you have installed the GPU-enabled package, run the following additional command:
pip uninstall hark-lib-gpu

 

Back to Top