-
Notifications
You must be signed in to change notification settings - Fork 50
Qkit Installation
This guide provides instructions on how to install qkit, and fix some common configuration issues.
(Optional, recommended) Create a virtual environment and enable it. Linux:
python -m virtualenv venv
source venv/bin/activateWindows:
python -m virtualenv venv
.\venv\bin\activate.batInstall qkit with pip (recommended):
pip install qkit[jupyter]In case you which to develop qkit actively, it is recommended you clone the repository and install it as a editable package:
pip install --editable '.[jupyter,analysis]'Run the integrated qkit installer for self-configuration. Linux:
qkit-installWindows requires administrator privileges for some changes:
Start-Process qkit-install -Verb runAsCongratiulations, you're done! Start qkit with the QKit Jupyter Lab Application on Linux or the 'launch.bat' batch file on Windows!
The self-configuration will associate .h5-files with qkit, and set the environment variables QKIT_LOCAL_CONFIG and QKIT_VENV to the correct values. It will also
create the required directories for data, notebooks and logs, and it will instantiate the configuration files for Jupyter Lab and Qkit.
If the notebooks folder this creates does not match your needs, you can change it by modifiying jupyter_lab_config.py:
# Set Notebook directory
notebook_dir = r'C:\notebooks' # Change this lineWARNING: You will need to migrate your local config to a parent directory of your notebooks, or point to it using the environment variable QKIT_LOCAL_CONFIG. It is possible to set this environment variable in jupyter_lab_config.py, as environment variables are inherited to process children.
Previously, the configuration of qkit was located in qkit/config/local.py. As this directory is now a child of src/, you are probably not supposed to touch this file. This method is deprecated (you will receive warnings).
Instead, in a parent directory, a file named qkit_local_config.py is used to configure your environment.
To migrate, copy the code in your old local.py into the new qkit_local_config.py file. Do note, however, that the datadir and logdir paths have changed. It is recommended to use the new values. Conflicting entries in your config may need to be deleted.