h2> 0 x00 background
suddenly one day IDA6.8 opens and prompt idapython error:
message:
0x01 problem cause
IDA website has an explanation for this problem:
This issue is usually caused by presence of non-standard python27.dll
in the PATH which uses its own set of modules (you should edit PATH in
this case). However, it may happen if your Python installation is
broken in some way. Reinstalling Python manually may fix it.
The general reason for
is that your host’s environment variable path contains the non-standard python27.dll, and, of course, it may also be due to an unexpected terminal during an installation. Manually reinstalling Python may fix this problem.
0x02 problem fix
official also kindly give detailed repair method:
- view python27. DLL location
c:\>where python27.dll
C:\Windows\System32\python27.dll
- view in the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Python 2.7\InstallPath
the value is python2.7’s installation path - adding an environment variable with the key PYTHONHOME and the value is Python’s installation path.
- if idapython was loaded normally but this error still exists, print sys.path to determine if it is as expected
Python>import sys
Python>sys.path
['C:\\Windows\\system32\\python27.zip', 'C:\\Python27-x64\\Lib', 'C:\\Python27-x64\\DLLs', 'C:\\Python27-x64\\Lib\\lib-tk', 'C:\\Program Files\\IDA 7.0\\python', 'C:\\Python27-x64', 'C:\\Python27-x64\\lib\\site-packages', 'C:\\Program Files\\IDA 7.0\\python\\lib\\python2.7\\lib-dynload\\ida_32', 'C:\\Program Files\\IDA 7.0\\python']
- tracks the loading process of IDAPython module. Set the environment variable
PYTHONVERBOSE=1
before IDA runs, and the path path will be printed out (or add -l to the IDA run command to generate the log file).
0x03 problem solved
using the third step, creating an environment variable PYTHONHOME will solve my current problem.
is the pitfall of some blog that creates the environment variable %PYTHONHOME%
. What the hell is that?
in the context of environment variables, %path% means that path is a defined call to an environment variable, equivalent to $path in Linux. The first time you define a variable, you don’t use %%.
0x04 reference
https://www.hexblog.com/?p=1132
Read More:
- Solution to garbled code problem after importing project in eclipse
- Error importing keras in jupyter Notebook: modulenotfounderror: no module named ‘keras’ solution
- The sharepoint2010 site cannot open a solution that displays an “an unexpected error has occurred” error
- ImportError: Importing the multiarray numpy extension module failed.
- Importing the multiarray numpy extension module failed
- ImportError: DLL load failed while importing xxx: The specified program could not be found.
- How to Fix gdb error: Failed to import the site module,No module named ‘_sysconfigdata_m’
- After tensorflow installation, an error occurred while importing: importerror: DLL load failed: the specified module could not be found
- The solution to the error of importing CSV from Python to Python
- Importerror: DLL load failed while importing win32gui: 1 is not a valid Win32 Application.
- Solutions to the failure of importing Python 3.7 SSL module
- “Cannot access GitHub because this site uses HSTs.” Problem solving
- ImportError: cannot import name ‘Optional‘ from ‘torch.jit.annotations‘ (F:\Python37\lib\site-packag
- After SAP Spartacus successfully logs in, does the request base site need access token
- Cannot remove entries from nonexistent file /usr/local/bin/anaconda2/lib/python2.7/site-packages/eas
- Solve the problem of red wavy line in pychar when importing module written by oneself
- If the iframe in IE refers to the cross domain site page, the session fails
- KeyError: ‘/home/xxx/anaconda3/lib/python3.8/site-packages/parso/python/grammar38.txt‘
- Error in STS importing POM file of Maven project
- Python has a bus error while importing tensorflow