问题
What is sys._MEIPASS. What is the value of this variable and it's use ? I was a looking one python script but when I ran it on eclipse(pydev). It showing error.
回答1:
sys._MEIPASS is a temporary folder for PyInstaller. See this question for more information.
回答2:
If you want to disable the error Lint gives you in your editor (Eclipse, MS-Code, ...) add the following comment at end of your line:
if getattr(sys, 'frozen', False): # Running as compiled
running_dir = sys._MEIPASS + "/files/" # pylint: disable=no-member
The solution was from here if you want to disable a single line of code, not all errors of a kind.
来源:https://stackoverflow.com/questions/22472124/what-is-sys-meipass-in-python