TylerGubala / bpy-build

Python build script for Blender as a python module
GNU General Public License v3.0
40 stars 9 forks source link

Cannot import bpy-types, hardcoded paths to your user folder #3

Closed tngreene closed 6 years ago

tngreene commented 6 years ago

Hi! I'm intersted in using bpy as a module without a lot of hassle, and so I found your project!

I tried downloading it as instructed and got this message (before Python crashed) when I tried to import it.

λ python                                                                                                             
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32                  
Type "help", "copyright", "credits" or "license" for more information.                                               
>>> import bpy                                                                                                       
Color management: using fallback mode for management                                                                 
BLT_lang_init: 'locale' data path for translations not found, continuing                                             
AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead                                          
bpy: couldnt find 'scripts/modules', blender probably wont start.                                                    
Freestyle: couldn't find 'scripts/freestyle/modules', Freestyle won't work properly.                                 
ModuleNotFoundError: No module named 'bpy_types'                                                                     
ModuleNotFoundError: No module named 'bpy_types'                                                                     
ERROR (bpy.rna): c:\users\tgubs\.blenderpy\blender\source\blender\python\intern\bpy_rna.c:6662 pyrna_srna_ExternalTyp
e: failed to find 'bpy_types' module                                                                                 
ModuleNotFoundError: No module named 'bpy_types'                                                                     
ModuleNotFoundError: No module named 'bpy_types'                                                                     
ERROR (bpy.rna): c:\users\tgubs\.blenderpy\blender\source\blender\python\intern\bpy_rna.c:6662 pyrna_srna_ExternalTyp
e: failed to find 'bpy_types' module                                                                                 
ModuleNotFoundError: No module named 'bpy_types'                                                                     
ERROR (bpy.rna): c:\users\tgubs\.blenderpy\blender\source\blender\python\intern\bpy_rna.c:6662 pyrna_srna_ExternalTyp
e: failed to find 'bpy_types' module                                                                                 
F0824 17:59:43.356714  3724 utilities.cc:322] Check failed: !IsGoogleLoggingInitialized() You called InitGoogleLoggin
g() twice!                                                                                                           
*** Check failure stack trace: ***                                                                            

I think you have a build error somewhere. Possibly related to the fact that on my computer I don't have a tgubs folder. I'm on Windows 10, x64bit. Also, in my PATH I am using Blender 2.78 for development reasons. Maybe that had some issue as well?

TylerGubala commented 6 years ago

Please see the following issue:

https://github.com/TylerGubala/blenderpy/issues/13

It has nothing to do with my users folder; those messages are generated at compile time, so when I build wheels those messages are still set to my user folder because I'm the one who built the module from sources.

You need to move the 2.79 folder in your Anaconda environment. This will be fixed in the next release.

tngreene commented 6 years ago

Thanks for the response. As a hopefully useful note: I missed the "move 2.79 folder to Anaconda Env" step because I read Option 1 and thought "How It Works" was exclusively describing the process with Option 2.

TylerGubala commented 6 years ago

I'm in the process of resolving it to that in the future you potentially won't have to do that move step yourself.

I hope it's working for you now, and thanks for filing the issue! I will work towards making the documentation clearer.