New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Help] pcbnew not found (KiCad 8 on Ubuntu 20.04) #606
Comments
How did you install KiCad 8? On a WSL shell try: $ python3
>>> import pcbnew If it fails then KiCad is wrongly installed. Try to find where is pcbnew.py, like this:
Also try running:
|
Hello Salvador, I installed KiCad like this:
The output of the python shell is:
The output of
And
|
Ok, this package contains pcbnew.py and a link to the binary.
Your Python is 3.8, a little bit old. Which Ubuntu do you have installed? (Should be 20.04)
Python can't load the library, so the lib is wrongly installed.
Here the relevant is: /usr/lib/python3.8/site-packages/pcbnew.py, which is right for Python 3.8. Note: You have a real mess with KiKit and friends, you have 4 copies of pcbnewTransition, this is a potential problem for. You should have just one: /usr/lib/python3/dist-packages/pcbnewTransition/pcbnew.py
So this is in the right place. Try:
Also try reinstalling KiCad, if you didn't clean the apt cache you should be able to run:
|
I will update it when I can, I have Ubuntu 20.04
Ok, should I just delete them? I really don't know what to do with this. I believe kikit was installed only by kibot, but I don't really remember, it was a while ago.
I don't know if it's useful, but I also searched for this:
And this:
No luck, cache was clean apparently. I will try reinstalling it from scratch. |
It looks like you have various installations:
You should take a look at what is installed in:
The sizes matches with the 8.0.1 package for 20.04
Do you have an environment variable named PYTHONPATH, try:
Also try this:
Looking at the values in my system I suspect the KiCad package is wrong. Try this:
Or just:
And then install KiBot. |
This is what happens when I add PYTHONPATH to the environment variable as you suggested:
So it seems fine (except kikit), but if I try to update and upgrade this happens:
Regarding kikit, this happens when I try to uninstall it (also with sudo):
|
Ok, so the KiCad package is wrong.
This is because you defined the variable for the user and then you switched to root. Try this:
Look in google how to make the environment variable available to all users.
Try the --user option. |
BTW: Try running |
The following happens also as root:
This works, apparently. At least I don't have an error anymore when I apt upgrade. Thank you.
This is what happens, also as root:
By the way, thank you for your support. |
You are using the wrong pcbnewTransition, this is one installed with pip and is obsolete.
Then run KiKit again. Remove any copy that isn't from /usr/lib/python3 |
Done. The only one remaining is: Still, I get errors when I run
|
This is the same error you had with KiBot, are you defining the environment variable? Another solution is to make something like this:
|
I guess so, I created a
and I have checked it to be present in env.
Result:
|
Double check it using the Python interpreter, i.e.
Just create the missing dir:
If you take a look at the Debian package for Ubuntu 22.04 you'll see the files are in a similar dir |
Done, no luck anyway. kikit version still returns fails:
|
Please post the full output for:
|
Interpreter test (also posted above):
dist-packages test:
|
Hi @Unichord ! With the above results I don't see why KiKit could fail. In particular when all the other scripts work (i.e. KiBot and iBoM). What do you get from:
|
This is the output (also as root):
Just a thought: would docker somehow help solve all these problems? I'm by all means not an expert, but from what I read it helps dependency-related issues. |
The versions looks right
Yes, with docker images you have a container where all the needed dependencies are met. I use them all the time. I.e. I currently have KiCad 7.0.11 installed, so any test using KiCad 8, 6 or 5 is done using docker images. |
Hi @Unichord ! I see tree paths here:
Please let me know so I can decide to keep this issue open or not |
Thank you for your continued support. |
Hmmm ... I don't know about docker tools for Windows, I use the command line tools for linux, but I guess there are simple stuff to install. After this you'll need to get the docker image for KiBot, the names are explained in the docs. Then comes: how to use them. I see various users just use a bash shell for Windows and use it from command line, but I don't know if something simpler is available.
Ok. |
When upgrading Ubuntu version kibot was uninstalled, so since I have to reinstall everything, I'll try and run kibot with Docker. I guess I managed to install it (ghcr.io/inti-cmnb/kicad8_auto) in WSL, but I don't understand how to "run" it, or to have it always running so that I can use it from a shell. I tried |
The kibot package pulls most dependencies. Don´t know why upgrading Ubuntu uninstalled KiBot, this is not normal.
I recommend the full images, like ghcr.io/inti-cmnb/kicad8_auto:latest. Take a look at the scripts in the repo, like this The --rm means remove the instance after finishing, no background run. Note that a lot of users runs the docker images on Windows directly. The above script is for Linux, so the syntax is ok for WSL. |
Ok, it seems like it's working, I run:
And in the subsequent shell kibot-check is completely ok, so it's ok in my opinion. Thank you for your support. If I understand correctly, I should run this script every time I need to run kibot, am I right?
This would be even better, I installed Docker Desktop for Windows and it seems like it's working too, but I don't know how to properly run it like the script you wrote, and it's documented quite poorly it seems, I have to dig deeper into it. |
Not sure I understand. Once you run the script you get a shell inside the docker container, you can run KiBot many times in this shell. But yes, you must start the container at least once.
Ok, the trick here is how to mount the volumes so you can access your project in an easy way. Also how to keep your KiCad preferences synced between the KiCad for Windows and the KiCad inside the docker image. |
for the reference, I run kicad 8 ppa on 20.04 too and kikit didn't work after update, here's how I fixed my install, partially with help of this post. |
Maybe I'm running kibot in an unconventional way? I'll explain my process (or what I want to achieve) to clarify what I mean: once I complete a PCB (which happens quite often, I'm talking about multiple times per week) I run a I'm trying to automate this but due to lack of time lately I didn't yet. But a 1-click script is in my to-do list. Starting docker is a bit slow, though, so I will consider running it in background.
What do you mean? Like relative paths and so on? |
The problem comes when you need to iterate. Lets say you don't like the angle of a view, or the order of the BoM columns, or you just realize some data is missing in the components. So you start running KiBot over and over until you get the exact results. Once you have it done you can run KiBot after each revision of the project. If you start a docker container for each iteration you'll waste time. But if you open it in an interactive way you can iterate inside the container, running a script, or just using the bash history (last command you ran).
Yes, but in general it depends on the layout of your projects, this is something quite personal. If you setup KiCad using absolute paths, and even worst, using drive letters, things might get complicated. You might need to have two different configurations: one for Linux and another for Windows, and then make sure both are synced. |
Well, yes. For the first times the goal is for sure to iterate, fix problems, see what's missing, etcetera. So as you said, interactive way is my go-to method at the beginning.
No, as far as I see, my paths are relative so there should be no problems. |
I installed KiCad 8.0.1 on WSL running in Win10, can't run kibot anymore after I updated kibot to 1.6.5
kibot-check fails and returns this error:
This is the output of
apt upgrade
It's most probably an environment issue, but I have no clue on how to fix it. If anything else is needed, please let me know.
The text was updated successfully, but these errors were encountered: