Skip to content
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

Python error on linux #76

Open
fami-fish opened this issue Oct 6, 2024 · 13 comments
Open

Python error on linux #76

fami-fish opened this issue Oct 6, 2024 · 13 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@fami-fish
Copy link

Extension wont activate:
image

Pip is installed:
image

Any help as to how i can fix this? I installed pillow on my system too.. and blender's own pip environment seems to have PIL installed.

@fami-fish
Copy link
Author

Im on blender 4.2.1 LTS, which i think is supported

@30350n
Copy link
Owner

30350n commented Oct 6, 2024

Not sure what's the issue here tbh, only thing that seems wrong is your python version. It should be 3.11 but is 3.12 for some reason (incorrect packaging most likely).

Looking at that installation path, it could in theory also be a dependency collision with some other extension you installed.

@30350n 30350n self-assigned this Oct 6, 2024
@30350n 30350n added the invalid This doesn't seem right label Oct 6, 2024
@fami-fish
Copy link
Author

Not sure what's the issue here tbh, only thing that seems wrong is your python version. It should be 3.11 but is 3.12 for some reason (incorrect packaging most likely).

Looking at that installation path, it could in theory also be a dependency collision with some other extension you installed.

Is there a breaking change in 3.12 from 3.11? It should still run i assume the version bump does not include breaking changes.

Also, its not a dependency collision as i tried removing my plugins (of which there was only one anyways, which im pretty sure did not utilize pip). Running ls on the .local/lib/python3.12/site-packages/PIL directory shows its completely empty, and the directory and the __init__.py file does not exist. Any guidance? im going to do a system upgrade now in hopes that it fixes things but maybe a way to manually install pip and/or symlink it to the directory would be good. I still have no clue how blender is seeing some version of pil, even though its not present in .local anywhere

@30350n
Copy link
Owner

30350n commented Oct 8, 2024

Is there a breaking change in 3.12 from 3.11? It should still run i assume the version bump does not include breaking changes.

Generally no, but Blender not using the correct python version generally hints that whoever packaged Blender for whatever distro you are using messed up. It could for example be that they decided to reuse your system Python for Blender, in which case, It could be that and outdated version of pillow (or worse, PIL) is installed there.

It could also be that the pillow wheel included with the extension (pillow-10.4.0-cp311-cp311-manylinux_2_28_x86_64.whl from here) somehow fails to install because of the version mismatch.

@babolait
Copy link

I have the same problem under blender 4.2.1 :

Capture d’écran du 2024-10-21 15-54-42

Sorry, newbie here, but, you need to install pip in order to run the module pcb importer ?

When I run the commands of @fami-fish (PIL / print(PIL.version) it seem "PIL" is not installed :

Capture d’écran du 2024-10-21 16-05-29

On the first try of enabling pcb importer the problem was "no module named skia", after reboot of blender, it is now the PIL error.

I am on fedora 40.

@30350n
Copy link
Owner

30350n commented Oct 21, 2024

Like I said previously, this is most likely a packaging issue, not an issue with this extension or Blender. In the case of Fedora 40, it almost definitely is:

image

So either install Blender by directly downloading a build from https://www.blender.org/download/ or possibly by using something like flatpak.

The other option would be to bug your responsible package maintainer to fix their packaging to produce non broken Blender builds.

@mothdotmonster
Copy link

I can confirm this issue also occurs for me on Arch Linux.

@30350n
Copy link
Owner

30350n commented Oct 25, 2024

I can confirm this issue also occurs for me on Arch Linux.

Seems like someone already created a bug report there atleast. Could you check if it works with the blender-bin package from the AUR? @mothdotmonster
That one should ship with the correct bundled python version.

@babolait
Copy link

Like I said previously, this is most likely a packaging issue, not an issue with this extension or Blender. In the case of Fedora 40, it almost definitely is:

image

So either install Blender by directly downloading a build from https://www.blender.org/download/ or possibly by using something like flatpak.

The other option would be to bug your responsible package maintainer to fix their packaging to produce non broken Blender builds.

I tried with the version downloaded directly from blender website. I am new to fedora / linux, so not sure if I have done it correctly. I tried installing your module and get the same error.
After that I installed it using flatpak. It is the 4.11. So when installed, I installed the dependencies (doing .venv and other console lines as asked) of blender (I assume they are needed for your module ?), using their tutorial.

I went for the install of your module, it could not load it cause of the init.py being at the top level, I created a folder and re-zipped it. Blender took the module, and said "module at XX installed at XXX" (see attachment), but when I search for it in the list, impossible to find it, do you have an idea ? I refreshed it, reboot the computer, re-do the installation but impossible to get it in the list and enable it.

Capture d’écran du 2024-10-25 18-49-18

I am sorry if those question are trivial, I have very hard time finding info on the install ;)
I can post that message elsewhere if you want.
Thank you

@30350n
Copy link
Owner

30350n commented Oct 27, 2024

I tried with the version downloaded directly from blender website. I am new to fedora / linux, so not sure if I have done it correctly. I tried installing your module and get the same error.

Can you share a screenshot of that again, aswell as a screenshot of your python console, as before?

After that I installed it using flatpak. It is the 4.11.

I guess you mean 4.1.1 here? The current version of this plugin only supports 4.2+ so that's not going to work.

So when installed, I installed the dependencies (doing .venv and other console lines as asked) of blender (I assume they are needed for your module ?), using their tutorial.

Not sure what that's supposed to mean exactly, but none of that should be required.

Installation should be as simple as downloading Blender and installing the PCB Importer extension via the builtin extensions UI.

@babolait
Copy link

Thank you for your answer.

I tried with the version downloaded directly from blender website. I am new to fedora / linux, so not sure if I have done it correctly. I tried installing your module and get the same error.

Can you share a screenshot of that again, aswell as a screenshot of your python console, as before?

In fact my problem is that I still don't get very well how to install stuff in fedora / linux.
When I tried with direct source on blender, I had a folder with a .exe, and when launching the app it work well but I was searching for a way to "install" it (have the app show up in the gnome), so I stopped here.

As for now, I launch the .exe and it work. After that your module that I had already installed showed up and I activated it and then imported the kicad generated file and it work like a charm, on fedora / blender 4.2.3 LTS.

On my render, do you know why there is black lines on my pcb ?

Capture d’écran du 2024-10-27 15-46-31

@30350n
Copy link
Owner

30350n commented Oct 31, 2024

On my render, do you know why there is black lines on my pcb ?

Because you are only previewing in viewport render mode. (Those lines represent relationships between objects).

@asdf23
Copy link

asdf23 commented Dec 5, 2024

Okay same issue Fedora 40 user. I tried installing the missing packages in python 3.12 this didn't work. Flatpak did work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

5 participants