Content of PYTHONPATH not appended to sys.path
Heinrich Löwe last edited by Heinrich Löwe
Hi, this is my first post in the new forum. I'm exited
I noticed, that the content of the
PYTHONPATHenvironment variable is not appended to the content of
sys.pathfor the c4d python interpreter. Since we use a lot of site-modules in our company, this issue is rather annoying.
For the time being I helped myself by updating
sys.pathduring plugin initialization, but I rather would not.
# extend sys.path whit content of PYTHONPATH python_path = os.environ['PYTHONPATH'].replace("\\", "/").split(';') for entry in python_path: if not entry in sys.path: sys.path.append(entry)
Is there a way to tackle the problem in a more convenient way, like a command line parameter or an environment variable? Is this behavior intended or is it just overlooked during the R20 upgrade process?
I looking forward to your answers,
y_puech last edited by y_puech
Welcome to the new forum
PYTHONPATH not added to sys.path is a known issue and has been already fixed for the R20 SP2 update.
I don't see a better workaround then your with R20 SP1 currently.
I turned this topic into a Q&A. Please use this functionality in the future. For more information see Q&A New Functionality.