-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
加密问题:始终识别不到模块 #69
Comments
Set PYTHONPATH: import sys, os |
int文件中line 6已如此设置,pyd files的目录为script。 |
import sys, os Set the QT_QPA_PLATFORM_PLUGIN_PATH environment variableos.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = r'.\site-packages\PyQt5\Qt5\plugins' Change the current working directory to the directory of this scriptos.chdir(os.path.dirname(file)) Add the 'script' directory to sys.pathsys.path.append(os.path.abspath('script')) Add the 'script.egg' directory to sys.path (this part is not typical)sys.path.append(os.path.abspath('script.egg')) if name == 'main':
|
已如此设置,但是只能识别py文件,而不能识别pyc或pyd |
import sys, os Add the directory containing .pyc and .pyd files to sys.pathsys.path.append(os.path.abspath('script')) Check File Extensions: Ensure that your .pyc and .pyd files have the correct file extensions and are compatible with the Python version you are using. .pyc files are compiled Python files, and .pyd files Import Statements: In your code, make sure that you are using the correct import statements to load modules from the script directory. You should use the module name without the file extension when importing. For example, if you have a file named mymodule.py in the script directory, you should import it like this: Permissions: Check read permissions for .pyc and .pyd files. |
尝试了以下方法均识别不到模块:
1.将script目录下的所有.py直接压缩并改为.egg放在.exe同级目录下
2.直接将script目录压缩为egg文件并放在exe同级
3.不压缩,将所有py文件替换为pyc文件
4.将所有py文件转化为pyd后放在script下
int文件配置如下:
只有将py放在script目录下且无压缩才能识别到。
请问如何处理才能正确识别到pyd文件以满足加密?
The text was updated successfully, but these errors were encountered: