Python does not detect .pyc files

前端 未结 2 1490
梦毁少年i
梦毁少年i 2021-01-06 17:35

I am using Python 3.2 (both for building and executing), and here is my question.

I intend to ship my python application with the following setup:

There is a

相关标签:
2条回答
  • 2021-01-06 18:15

    As stated below, two steps resolved the issue: Step 1: Copy the Module.cpython-32.pyc file from .__pycache__ directory to .\ Step 2: Rename the file to Module.pyc

    PS: Thanks to gecco for sharing the detail.

    0 讨论(0)
  • 2021-01-06 18:22

    Have a look at PEP-3147. They describe how the python-lookup mechanism works.

    enter image description here

    So in your concrete case: Put the file Module1.pyc directly in the root folder.

    0 讨论(0)
提交回复
热议问题