[lldb-dev] Fwd: Re: " Import error: No module named embedded_interpreter" on windows

kwadwo amankwa via lldb-dev lldb-dev at lists.llvm.org
Mon Oct 5 11:15:37 PDT 2015




-------- Forwarded Message --------
Subject: 	Re: [lldb-dev] " Import error: No module named 
embedded_interpreter" on windows
Date: 	Mon, 05 Oct 2015 19:06:23 +0100
From: 	kwadwo amankwa <que at lunarblack.com>
To: 	Zachary Turner <zturner at google.com>



here it is;

C:\Users\redbandit\Documents\GitHub\pygui>python
Python 2.7.10 (default, Sep 18 2015, 02:35:59) [MSC v.1800 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> import sys
 >>> sys.path
['', 'C:\\Python27\\Lib', 
'C:\\Users\\redbandit\\llvm\\build\\Debug\\lib\\site-packages\\lldb', 
'C:\\Users\\redbandit\\llvm\\build\\tools\\lldb\\scripts', 
'C:\\Users\\redbandi t\\Documents\\GitHub\\pygui', 
'C:\\Python27\\python27.zip', 'C:\\Python27\\DLLs', 
'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 
'C:\\Python27', 'C:\\Python27\\li b\\site-packages']
 >>> import lldb
Traceback (most recent call last):
   File "<string>", line 1, in <module>
ImportError: No module named embedded_interpreter
 >>> lldb.__file__
'C:\\Users\\redbandit\\llvm\\build\\tools\\lldb\\scripts\\lldb.pyc'
 >>> sys.path
['C:/Users/redbandit/llvm/build/Debug/lib/site-packages/lldb', 
'C:/Users/redbandit/llvm/build/Debug/lib/site-packages/lib/site-packages', 
'', 'C:\\Python27\\Lib', 'C:\\Users\\ 
redbandit\\llvm\\build\\Debug\\lib\\site-packages\\lldb', 
'C:\\Users\\redbandit\\llvm\\build\\tools\\lldb\\scripts', 
'C:\\Users\\redbandit\\Documents\\GitHub\\pygui', 'C:\\Pyt 
hon27\\python27.zip', 'C:\\Python27\\DLLs', 
'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 
'C:\\Python27', 'C:\\Python27\\lib\\site-packages', '.']

On 05/10/15 18:48, Zachary Turner wrote:
> Can you run the followign commands and paste the output?
>
> >>> import sys
> >>> sys.path
> ['D:/src/llvmbuild/ninja/bin', 
> 'D:/src/llvmbuild/ninja/lib/site-packages', 
> 'D:\\src\\llvmbuild\\ninja\\bin\\python27_d.zip', 
> 'C:\\Python27_LLDB\\x86\\DLLs', 'C:\\Python27_LLDB\\x86\\lib', 
> 'C:\\Python27_LLDB\\x86\\lib\\plat-win', 
> 'C:\\Python27_LLDB\\x86\\lib\\lib-tk', 'D:\\src\\llvmbuild\\ninja\\bin'
> , 'C:\\Python27_LLDB\\x86', 
> 'C:\\Python27_LLDB\\x86\\lib\\site-packages', '.']
> >>> import lldb
> >>> lldb.__file__
> 'D:/src/llvmbuild/ninja/lib/site-packages\\lldb\\__init__.pyc'
> >>> sys.path
> ['D:/src/llvmbuild/ninja/bin', 
> 'D:/src/llvmbuild/ninja/lib/site-packages', 
> 'D:\\src\\llvmbuild\\ninja\\bin\\python27_d.zip', 
> 'C:\\Python27_LLDB\\x86\\DLLs', 'C:\\Python27_LLDB\\x86\\lib', 
> 'C:\\Python27_LLDB\\x86\\lib\\plat-win', 
> 'C:\\Python27_LLDB\\x86\\lib\\lib-tk', 'D:\\src\\llvmbuild\\ninja\\bin'
> , 'C:\\Python27_LLDB\\x86', 
> 'C:\\Python27_LLDB\\x86\\lib\\site-packages', '.']
> >>>
>
> and also make sure that in the same folder as your _lldb_d.pyd, there 
> is an embedded_interpreter.py?
>
> On Mon, Oct 5, 2015 at 9:14 AM kwadwo amankwa <que at lunarblack.com 
> <mailto:que at lunarblack.com>> wrote:
>
>     Hi Zachary,
>
>     thanks for the reply , I did use MSBUILD  as Ninja didn't work for
>     me on my system.  As far as the _lldb_d.pyd file is concerned it
>     is stored in the same place.  and it is being used by lldb.py
>     because everything else works besides the embedded_interpreter.
>     That is I am able to use the api from python it is just that
>     interpreter issue that comes up .
>
>     Cheers,
>     Que
>
>
>     On 05/10/15 16:56, Zachary Turner wrote:
>>     Are you using MSBuild or Ninja to build (i.e. are you clicking
>>     the Build Solution button in Visual Studio or running ninja from
>>     command line)?  I don't know where it puts this stuff with a
>>     VS2013 build, but with a ninja build, your directory will be
>>     organized like this:
>>
>>     build
>>     |___bin
>>          |___lldb.exe
>>          |___liblldb.dll
>>     |___lib
>>          |___site-packages
>>                |___lldb
>>                      |___lldb_d.pyd   // If this is a debug build,
>>     lldb.pyd if release
>>
>>     I'm betting you're missing the pyd file.  Can you confirm? Then
>>     we can diagnose that if it turns out to be the problem.
>>
>>     On Mon, Oct 5, 2015 at 5:20 AM kwadwo amankwa via lldb-dev
>>     <lldb-dev at lists.llvm.org <mailto:lldb-dev at lists.llvm.org>> wrote:
>>
>>         Hi guys,
>>
>>         Can someone point me in the right direction on this . I have
>>         managed to
>>         set up my environment on windows , compiling python2.7.10
>>         using VS2013
>>         and building llvm/lldb in VS2013. lldb and all its libraries
>>         build
>>         successfully so its just when I import lldb into my python
>>         project I get
>>         this error.
>>
>>         File "<string>", line 1, in <module>
>>         Import error: No module named embedded_interpreter
>>
>>           Also when I use the 'script' command in the lldb
>>         interpreter , lldb
>>         completely crashes  with an unhandled exception in the  python
>>         file_write  function (fileobject.c:1852)
>>
>>         n2 = fwrite(s, 1, n, f->f_fp);
>>
>>         the call to fwrite causes an access violation  . My intuition
>>         tells me
>>         that i'm missing  a lib or something but I can't put my
>>         finger on it.
>>         Please Help !
>>
>>
>>         _______________________________________________
>>         lldb-dev mailing list
>>         lldb-dev at lists.llvm.org <mailto:lldb-dev at lists.llvm.org>
>>         http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151005/855b4220/attachment-0001.html>


More information about the lldb-dev mailing list