Unable to disable creation of __pycache__ and .pyc files - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Unable to disable creation of __pycache__ and .pyc files (/thread-13190.html) |
Unable to disable creation of __pycache__ and .pyc files - kpyeri - Oct-03-2018 When I install a package using pip, I would like to disable the creation of __pycache__ folders and .pyc files. I tried option -B with python and --no-cache-dir with pip but this does not prevent creation of these files/folders. Is anything else required for this to work?
RE: Unable to disable creation of __pycache__ and .pyc files - Larz60+ - Oct-03-2018 pip (i believe) uses gc. You can read about it here: https://docs.python.org/3.7/library/gc.html#module-gc there are arguments that you can include to modify behavior, but now you're messing with things you really shouldn't touch and I wouldn't go there. I rarely look at site-packages. Perhaps use something like bleachbit, but again, you better know exactly what you are doing. My suggestion: don't look at site packages, if you want to know what's installed with pip, use pip list |