cancel
Showing results for 
Search instead for 
Did you mean: 

Blender Discussions

shane-mccabe
Journeyman III

installation issue of prorender in blender

Can't enable prorender as an add-on in blender due to some file path issue. see below Screenshot 2023-02-22 at 21.54.23.png

What am I doing wrong?

0 Likes
1 Reply
Neils3d
Journeyman III

I run this script in scripting and this added the cffi into Blender using Python and then successfully added the Prorender plugin into Mac OS X.14.6, I hope the helps

 

import sys
import subprocess
import os
import platform
import bpy

def isWindows():
return os.name == 'nt'

def isMacOS():
return os.name == 'posix' and platform.system() == "Darwin"

def isLinux():
return os.name == 'posix' and platform.system() == "Linux"

def python_exec():

if isWindows():
return os.path.join(sys.prefix, 'bin', 'python.exe')
elif isMacOS():

try:
# 2.92 and older
path = bpy.app.binary_path_python
except AttributeError:
# 2.93 and later
import sys
path = sys.executable
return os.path.abspath(path)
elif isLinux():
return os.path.join(sys.prefix, 'sys.prefix/bin', 'python')
else:
print("sorry, still not implemented for ", os.name, " - ", platform.system)


def installModule(packageName):

try:
subprocess.call([python_exe, "import ", packageName])
except:
python_exe = python_exec()
# upgrade pip
subprocess.call([python_exe, "-m", "ensurepip"])
subprocess.call([python_exe, "-m", "pip", "install", "--upgrade", "pip"])
# install required packages
subprocess.call([python_exe, "-m", "pip", "install", packageName])

installModule("cffi")

0 Likes