Reputation: 11
pip2 install pyinstaller
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting pyinstaller
Using cached pyinstaller-4.1.tar.gz (3.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 /usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpXfz8sO
cwd: /tmp/pip-install-VoIwF7/pyinstaller
Complete output (4 lines):
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 16, in <module>
from importlib import import_module
ImportError: No module named importlib
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python2 /usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpXfz8sO Check the logs for full command output.
on both windows and linux unable to install pyinstaller on python 2. Say similar error. I need to compile a code written on python 2. Any body occur same error? Please help
Upvotes: 1
Views: 2205
Reputation: 108
First of all, you should upgrade your python version and here you are importing the package that is not installed so install first using pip install importlib
Upvotes: 0
Reputation: 717
The latest version of pyinstaller does not support Python 2.7, as described under Requirements.
For Python 2.7 to work, you must install version 3.6.
Upvotes: 2