0
$\begingroup$

I am using a system environment variable PYTHONPATH to use some Python libraries in Houdini. However, this seems to conflict with Blender. For example, I have numpy installed and this breaks Blender's FBX importer. Is it possible to make Blender ignore PYTHONPATH env variable and just use its own internal Python libs?

$\endgroup$
3
  • $\begingroup$ Do you use --python-use-system-env? $\endgroup$ Commented Apr 15, 2024 at 13:53
  • $\begingroup$ No, just using the normal shortcut that was added to my Start menu: C:\Program Files\Blender Foundation\Blender 4.1\blender-launcher.exe $\endgroup$ Commented Apr 15, 2024 at 16:18
  • $\begingroup$ What is the output of blender -b --python-expr "import sys; print(*sys.path, sep='\n')" and the same but with --factory-startup. $\endgroup$ Commented Apr 15, 2024 at 16:24

1 Answer 1

0
$\begingroup$

the PYTHONPATH should not be used unless you pass --python-use-system-env to Blender.

So if the PYTHOHNPATH is interfering with Blender's startup, that's something that should be fixed.

https://projects.blender.org/blender/blender/issues/115648#issuecomment-1076172

As a workaround you can create a .bat file with clearing PYTHONPATH and your Blender path:

set PYTHONPATH=
"C:\Program Files (x86)\Steam\steamapps\common\Blender\blender.exe"
$\endgroup$
1
  • $\begingroup$ Thanks unwave, this works for me and I have commented on the forum post. $\endgroup$ Commented Apr 16, 2024 at 18:29

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.