I have a program that uses couple of PY files. The code works perfectly till I use the PY files. However, for encryption when I delete the PY files and just keep the PYC files the program fails with message: ImportError: No module named abc
Any ideas/thoughts why python does not like the PYC here when everyting was working fine with the PY files?
.pyc
files contain byte-compiled python. These can be de-compiled again into very readable python code, and are not a protection from people studying the source code.
If you do want to use this, you need to make sure all files are compiled, use:
python -m compileall /path/to/package
before removing the .py
source files.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.