0

i want to write a code in python but when i Write code:

import os, os.path
import Blender
from Blender import NMesh,Object,Material,Texture,Image,Draw,Window,Registry
from RoRUtils_0_6_7 import *

__version__ = "0.6.7"

class RORExport:
    img = None
    def __init__(self, filename):
        self.filename = filename
        self.sectiontitles = getSectionTitles()
         self.settings = loadSettings()

It Show me the error " No module named Blender" i want to know how i import Blender in Python.Can some one help me?

1 Answers1

0

if you are trying to use blender API so firstly you need to install it through cmd:

pip install bpy and instead of "import Blender" make "import bpy" Hope that work for you

  • 1
    pip install bpy give error Command "python setup.py egg_info" failed with error code 1 in c:\users\umair\appdata\local\temp\pip-install-b9xf6b\bpy\ – Umair Ahmad Nov 16 '18 at 06:37
  • Okey I think that you have a problem with pip check this it could help you: https://stackoverflow.com/questions/35991403/pip-install-unroll-python-setup-py-egg-info-failed-with-error-code-1 – Idriss Mortabit Nov 16 '18 at 06:51