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

blender 2.82: python environment still not picked up by add-ons #82337

Closed
amurrayc opened this issue Mar 11, 2020 · 0 comments · Fixed by #82341
Closed

blender 2.82: python environment still not picked up by add-ons #82337

amurrayc opened this issue Mar 11, 2020 · 0 comments · Fixed by #82341

Comments

@amurrayc
Copy link
Contributor

amurrayc commented Mar 11, 2020

Describe the bug
As noted in #81218, since the upgrade to blender 2.82 the PYTHONPATH environment isn't checked any more:

blender patch

This means that, for example, numpy is not detected and so import numpy at the python console (in blender) produces a "not found" error. Also, add-ons that use numpy fail to load.

In this blender issue two workarounds are suggested.
#81313 proposes a solution using the second of these. However, while this allows import numpy at the console it appears that add-on loading happens before the --python-expr command is executed and so it still fails if the add-on depends on numpy.

I have a pull-request using the first solution proposed above which seems to work for me.

To Reproduce
Steps to reproduce the behavior:

  1. Install Blender normally.
  2. Download the zipfile from BlenderGIS and install it (under Edit/Preferences/Add-ons/Install...)
  3. Enable the add-on. (This should work)
  4. Quit and restart Blender.
  5. Observe the numpy-not-found error (although Blender will start)
  6. (Optionally) Note that in the Scripting tab import numpy works and that toggling the add-on brings it to life.

Expected behavior
Blender should start happily with the add-on enabled.

Additional context
I had the problem with the Archipack Pro addon but BlenderGIS is free so it's better for testing.

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.5.8, NixOS, 20.03beta482.b780aefc621 (Markhor)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.2
  • channels(root): "nixos-20.03beta482.b780aefc621, nixos-unstable-20.09pre215333.42f0be81ae0"
  • channels(murray): "home-manager"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
- blender
# a list of nixos modules affected by the problem
module:
amurrayc added a commit to amurrayc/nixpkgs that referenced this issue Mar 11, 2020
@veprbl veprbl self-assigned this Mar 12, 2020
@veprbl veprbl removed their assignment Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants