I'm trying to determine which files in the Python library are strictly necessary for my script to run. Right now I'm trying to determine where _io.py is located. In io.py (no underscore), the _io.py module (with underscore) is imported on line 60.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
Some modules are compiled directly into the interpreter -- there are no files corresponding to them. You can retrieve a list of these modules from
sys.builtin_module_names
. In my Pyton 3.1 installation,_io
is included in this list.You might want to have a look at snakefood to determine the dependencies of your script.
Try the DLLs folder under your base python install directory if you are on windows. It contains .pyd modules Ignacio mentions. I had a similar problem with a portable install. Including the DLLs folder contents to my install fixed it. I am using python 2.5.
Not all Python modules are written in Python. Try looking for
_io.so
or_io.pyd
.From python-list email archive: is "_io.py" missing from 2.7.4 ?, the situation for Python 2 and 3 is different:
In Python 2.7:
In Python 3: