KiKit icon indicating copy to clipboard operation
KiKit copied to clipboard

Update doc on how to install KiKit on APT based Linux distributions such as Debian.

Open VBruceHunt opened this issue 6 months ago • 3 comments

Prerequisites

  • [x] I have read FAQ
  • [x] I have searched existing issues (including closed ones)
  • [x] I use KiKit at least version 1.7.2 (older version are not supported)

KiKit version

None -- unable to install

KiCAD version (only KiCAD 8 and 9 are supported)

KiCAD version 9.0

Operating system

Linux Debian 12(bookworm)

Description

The bookworm default version of KiCAD is 6.0. I used the back port repository to install KiCAD 9.0. I updated sources.list to include the back port repository (deb http://deb.debian.org/debian bookworm-backports main allow-insecure=yes ) and then used the command "sudo apt install -t bookworm-backports kicad" to install KiCAD. The install completed with no errors. I launched KiCAD and opened by project. It opened right up. (The project was constructed via KiCAD 9.0 on my Window 10 laptop). Using the KiCAD project manager I opened the PCB Editor. The following message was displayed:

KiKit installation not found! No KiKit backend found! You probably installed KiKit only via PCM. Please follow the installation guid at the link below. Until you finish the installation no KiKit functions will be available. After finishing the installation, please restart KiCAD. https://yaqwsx.github.io/KiKit/latest/installation/intro/

I attempted to install KiKit by going to the URL just above and attempted to follow the Linux guide for the "backend". Debian 12 uses apt so I opened a terminal as suggested:

vbh@vbhden:~$ pip3 install kikit bash: pip3: command not found

No pip3 meant it needed to be installed. The installation went well so I issued the following:

vbh@vbhden:~$ pip3 install kikit error: externally-managed-environment

× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. vbh@vbhden:~$

So I tried the following:

vbh@vbhden:~$ sudo apt install python3-kikit [sudo] password for vbh: Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package python3-kikit vbh@vbhden:~$

Now it appears that I need to create a virtual environment because, presumably, KiKit is a non-Debian packaged Python application. However this is well beyond my capability and I suspect most people who are not Python fluent.

What is needed is a step by step set of install instructions that leads one through the complexity of the installation. It should include specifically how to deal with the following:

  • How to install pip3 if not installed ( presumably pointers to the installation instructions.).
  • How to deal with the "externally managed environment" issue.
  • How to deal with creating a virtual environment ( and explaining what that is ).

I would be happy to write this up in a general way and test it on several distros to make sure that the instructions have wider applicability than just Debian bookworm if that would help.

Steps to Reproduce

I've described the steps that led to the installation issue that presumably can be corrected with adequate documentation above. I am happy to help write the documentation should that be of assistance. I'm fluent in HTML.

VBruceHunt avatar Jun 19 '25 22:06 VBruceHunt

You'll find a Debian package for KiKit (named kikit) here: https://github.com/set-soft/debian

set-soft avatar Jun 20 '25 10:06 set-soft

I followed the above with the following result:

vbh@vbhden:~$ wget https://set-soft.github.io/debian/kibot.list --2025-06-21 05:38:04-- https://set-soft.github.io/debian/kibot.list -----------------------result elided for brevity-------------------------- Saving to: ‘kibot.list’ kibot.list 100%[===================>] 84 --.-KB/s in 0s
2025-06-21 05:38:04 (2.62 MB/s) - ‘kibot.list’ saved [84/84] vbh@vbhden:~$ sudo cp kibot.list /etc/apt/sources.list.d/ [sudo] password for vbh: vbh@vbhden:~$ wget https://set-soft.github.io/debian/kibot.gpg --2025-06-21 05:39:13-- https://set-soft.github.io/debian/kibot.gpg -----------------------result elided for brevity-------------------------- Saving to: ‘kibot.gpg’ kibot.gpg 100%[===================>] 5.84K --.-KB/s in 0.001s
2025-06-21 05:39:13 (10.0 MB/s) - ‘kibot.gpg’ saved [5984/5984] vbh@vbhden:~$ sudo cp kibot.gpg /etc/apt/ vbh@vbhden:~$ sudo apt-get update -----------------------result elided for brevity-------------------------- The following additional packages will be installed: -----------------------result elided for brevity-------------------------- Suggested packages: kikit-doc libqscintilla2-doc meshlab geomview librecad openscad-testing python-lark-doc The following NEW packages will be installed: kikit lib3mf1 libgeos-c1v5 libgeos3.11.1 libopencsg1 libqscintilla2-qt5-15 libqscintilla2-qt5-l10n libqt5gamepad5 libqt5multimedia5 libzip4 openscad openscad-mcad python3-click python3-colorama python3-commentjson python3-lark python3-markdown2 python3-pcbnewtransition python3-pybars python3-pymeta python3-shapely 0 upgraded, 21 newly installed, 0 to remove and 2 not upgraded. Need to get 6,950 kB of archives. After this operation, 24.5 MB of additional disk space will be used. Do you want to continue? [Y/n] Y -----------------------result elided for brevity-------------------------- Fetched 6,950 kB in 1s (4,635 kB/s)
-----------------------result elided for brevity-------------------------- Setting up kikit (1.7.2-1) ... -----------------------result elided for brevity-------------------------- vbh@vbhden:~$

Your solution is excellent. The instructions were clear and simple to follow. It would be great if a pointer to your instructions were included under, say, a heading like, "Debian Installation".

Thanks for your insight and an excellent solution!

VBruceHunt avatar Jun 21 '25 13:06 VBruceHunt

I'm in the same situation - using Linux Mint 22.2.

Basically, the recommended installation is rather bad: You recommend to install a lot of Python packages system wide without using the package manager (apt): This has been discouraged for a long time - you risc breaking the OS by installing non-compatible packages.

I actually succeeded installing kikit using pip: But I got a user local install hosted by PlatformIO as result - not a system wide install. And I had to add an environment variable pointing to the KiCAD system wide Python packages for the installation to work as KiCAD is installated system wide using apt.

But even though the backend now works as a local install, the KiCAD plugins does not: It claims kikit hasn't been installed.

Using the above mentioned Debian package works, though: Thanks @set-soft

But you really should reconsider your installation instructions: Installing any Pythons software system wide using pip is very bad practice.

larsskj avatar Oct 25 '25 17:10 larsskj