Search code examples
python-3.xcommand-promptpython-module

.pyc not generated while creating module


I am trying to create a python module but a .pyc file is not created. I am working in windows. I execute 2 commands in command prompt(which I run as administrator) as following: c:\Python33\python.exe setup.py sdist after this statement is executed in the same window I execute c:\Python33\python.exe setup.py install I don't know what I am lacking???


Solution

  • Python3.x doesn't create .pyc files in the same directory. This is part of python3's __pycacahe__ standard. Instead, your .pyc files are stored in __pycache__ for the version that you build for.

    This was mentioned in Brett Cannon's talk at Pycon-2013