I'm trying to install pyinstaller 3.5 in python 3.4.3 but i get this error:
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\DTI~1.DES\AppData\Local\Temp\pip-install-_dyh3r_g\pefile\
The command i use is this:
pip install pyinstaller==3.5
I'm using the latest version that 3.4.3 can use of pip, setuptools and wheel.
pip 19.1.1
setuptools 43.0.0
wheel 0.33.6
I appreciate all the help.
this is the full log:
pip install pyinstaller=="3.5"
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Collecting pyinstaller==3.5
Using cached https://files.pythonhosted.org/packages/e2/c9/0b44b2ea87ba36395483a672fddd07e6a9cb2b8d3c4a28d7ae76c7e7e1e5/PyInstaller-3.5.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting pywin32-ctypes>=0.2.0 (from pyinstaller==3.5)
Using cached https://files.pythonhosted.org/packages/9e/4b/3ab2720f1fa4b4bc924ef1932b842edf10007e4547ea8157b0b9fc78599a/pywin32_ctypes-0.2.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in c:\python34\lib\site-packages (from pyinstaller==3.5) (43.0.0)
Collecting altgraph (from pyinstaller==3.5)
Using cached https://files.pythonhosted.org/packages/ee/3d/bfca21174b162f6ce674953f1b7a640c1498357fa6184776029557c25399/altgraph-0.17-py2.py3-none-any.whl
Collecting pefile>=2017.8.1 (from pyinstaller==3.5)
Using cached https://files.pythonhosted.org/packages/f9/1e/fc4fac0169d16a98577809400bbcfac8ad1900fa792184327b360ea51fc6/pefile-2021.5.13.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\DTI~1.DES\AppData\Local\Temp\pip-install-3rgqa38b\pefile\setup.py", line 86, in <module>
long_description = "\n".join(_read_doc().split('\n')),
File "C:\Users\DTI~1.DES\AppData\Local\Temp\pip-install-3rgqa38b\pefile\setup.py", line 33, in _read_doc
tree = ast.parse(f.read())
File "c:\python34\lib\ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 3789
f'Export directory contains more than 10 repeated entries '
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\DTI~1.DES\AppData\Local\Temp\pip-install-3rgqa38b\pefile\
pefile (one of the PyInstaller dependencies) requires python >= 3.6.0
Try pip install pyinstaller This should work
or
If you wanted the specific version you can do that by
pip install pyinstaller == "3.5"
Related
Installing wxpython with pip gives the error ModuleNotFoundError: No module named 'attrdict'
Details:
py -3.10-64 -m pip install -U wxpython
Collecting wxpython
Using cached wxPython-4.2.0.tar.gz (71.0 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Bernard\AppData\Local\Temp\pip-install-dokcizpt\wxpython_662eefb4314c47eba7b194b4d07a8e18\setup.py", line 27, in <module>
from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
File "C:\Users\Bernard\AppData\Local\Temp\pip-install-dokcizpt\wxpython_662eefb4314c47eba7b194b4d07a8e18\buildtools\config.py", line 30, in <module>
from attrdict import AttrDict
ModuleNotFoundError: No module named 'attrdict'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
What works
installing other packages works, e.g.
py -3.10-64 -m pip install -U mido
Requirement already satisfied: mido in c:\python311\lib\site-packages (1.2.10)
Version info
Windows 10 22H2
pip 23.0.1 from C:\Python311\Lib\site-packages\pip (python 3.11)
Context
This is used in the fluidpatcher installer, I logged a bug here.
Update 1
Seems to be a known issue reported here: https://github.com/wxWidgets/Phoenix/issues/2296
Tried workaround of manually installing
py -3.10-64 -m pip install -U attrdict3
Which installs.
Then retried the wxpython install
py -3.10-64 -m pip install -U wxpython
Which fails, this time with a different error message
Collecting wxpython
Using cached wxPython-4.2.0.tar.gz (71.0 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pillow in c:\python311\lib\site-packages (from wxpython) (9.4.0)
Requirement already satisfied: six in c:\python311\lib\site-packages (from wxpython) (1.16.0)
Requirement already satisfied: numpy in c:\python311\lib\site-packages (from wxpython) (1.24.2)
Installing collected packages: wxpython
DEPRECATION: wxpython is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for wxpython ... error
error: subprocess-exited-with-error
× Running setup.py install for wxpython did not run successfully.
│ exit code: 1
╰─> [49 lines of output]
C:\Python311\Lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
warnings.warn(
C:\Python311\Lib\site-packages\setuptools\config\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
C:\Python311\Lib\site-packages\setuptools\dist.py:317: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running install
C:\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
Will build using: "C:\Python311\python.exe"
3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
Python's architecture is 64bit
cfg.VERSION: 4.2.0
Running command: build
Running command: build_wx
Command '"C:\Python311\python.exe" -c "import os, sys, setuptools.msvc; setuptools.msvc.isfile = lambda path: path is not None and os.path.isfile(path); ei = setuptools.msvc.EnvironmentInfo('x64', vc_min_ver=14.0); env = ei.return_env(); env['vc_ver'] = ei.vc_ver; env['vs_ver'] = ei.vs_ver; env['arch'] = ei.pi.arch; env['py_ver'] = sys.version_info[:2]; print(env)"' failed with exit code 1.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python311\Lib\site-packages\setuptools\msvc.py", line 1120, in __init__
self.si = SystemInfo(self.ri, vc_ver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\setuptools\msvc.py", line 596, in __init__
vc_ver or self._find_latest_available_vs_ver())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\setuptools\msvc.py", line 610, in _find_latest_available_vs_ver
raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: No Microsoft Visual C++ version found
Finished command: build_wx (0m1.80s)
Finished command: build (0m1.80s)
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
--skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.
"C:\Python311\python.exe" -u build.py build
Command '"C:\Python311\python.exe" -u build.py build' failed with exit code 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> wxpython
I'm trying to install lxml with static dependencies on OSX using the following command:
STATIC_DEPS=true pip install -U lxml --no-cache-dir
Running this throws a nice long error:
Collecting lxml
Downloading https://files.pythonhosted.org/packages/da/b5/d3e0d22649c63e92cb0902847da9ae155c1e801178ab5d272308f35f726e/lxml-4.3.4.tar.gz (2.5MB)
|████████████████████████████████| 2.5MB 2.2MB/s
ERROR: Complete output from command python setup.py egg_info:
ERROR: Checking for gcc...
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.
Building lxml version 4.3.4.
Latest version of zlib is 1.2.11
Downloading zlib into libs/zlib-1.2.11.tar.gz from https://zlib.net/zlib-1.2.11.tar.gz
Unpacking zlib-1.2.11.tar.gz into build/tmp
Latest version of libiconv is 1.16
Downloading libiconv into libs/libiconv-1.16.tar.gz from https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
Unpacking libiconv-1.16.tar.gz into build/tmp
Latest version of libxml2 is 2.9.9
Downloading libxml2 into libs/libxml2-2.9.9.tar.gz from http://xmlsoft.org/sources/libxml2-2.9.9.tar.gz
Unpacking libxml2-2.9.9.tar.gz into build/tmp
Latest version of libxslt is 1.1.33
Downloading libxslt into libs/libxslt-1.1.33.tar.gz from http://xmlsoft.org/sources/libxslt-1.1.33.tar.gz
Unpacking libxslt-1.1.33.tar.gz into build/tmp
Starting build in build/tmp/zlib-1.2.11
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/cy/ywx04ttn12n_xmgjf5s6sbzr0000gn/T/pip-install-27hg_iw0/lxml/setup.py", line 239, in <module>
**setup_extra_options()
File "/private/var/folders/cy/ywx04ttn12n_xmgjf5s6sbzr0000gn/T/pip-install-27hg_iw0/lxml/setup.py", line 150, in setup_extra_options
STATIC_CFLAGS, STATIC_BINARIES)
File "/private/var/folders/cy/ywx04ttn12n_xmgjf5s6sbzr0000gn/T/pip-install-27hg_iw0/lxml/setupinfo.py", line 81, in ext_modules
multicore=OPTION_MULTICORE)
File "/private/var/folders/cy/ywx04ttn12n_xmgjf5s6sbzr0000gn/T/pip-install-27hg_iw0/lxml/buildlibxml.py", line 412, in build_libxml2xslt
cmmi(zlib_configure_cmd, zlib_dir, multicore, **call_setup)
File "/private/var/folders/cy/ywx04ttn12n_xmgjf5s6sbzr0000gn/T/pip-install-27hg_iw0/lxml/buildlibxml.py", line 330, in cmmi
call_subprocess(configure_cmd, cwd=build_dir, **call_setup)
File "/private/var/folders/cy/ywx04ttn12n_xmgjf5s6sbzr0000gn/T/pip-install-27hg_iw0/lxml/buildlibxml.py", line 320, in call_subprocess
raise Exception('Command "%s" returned code %s' % (cmd_desc, returncode))
Exception: Command "./configure --prefix=/private/var/folders/cy/ywx04ttn12n_xmgjf5s6sbzr0000gn/T/pip-install-27hg_iw0/lxml/build/tmp/libxml2" returned code 1
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cy/ywx04ttn12n_xmgjf5s6sbzr0000gn/T/pip-install-27hg_iw0/lxml/
WARNING: You are using pip version 19.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Does anyone know how to resolve this snag? Any suggestions are welcome!
I'm trying to install pyautogui through code 'pip install pyautogui'
But the program always give me an error like following
I started Visual Studio Code with Administration Authority
=========================================================================================
(.venv) C:\Users\USer\Desktop\pythoncode>pip install pyautogui
Collecting pyautogui
Using cached https://files.pythonhosted.org/packages/19/ef/438d80abd396fd2d124bd37c07c765f913723c54197c4c809d85c8ff5a43/PyAutoGUI-0.9.41.tar.gz
Collecting pymsgbox (from pyautogui)
Using cached https://files.pythonhosted.org/packages/b6/65/86379ede1db26c40e7972d7a41c69cdf12cc6a0f143749aabf67ab8a41a1/PyMsgBox-1.0.6.zip
Collecting PyTweening>=1.0.1 (from pyautogui)
Using cached https://files.pythonhosted.org/packages/b9/f8/c32a58d6e4dff8aa5c27e907194d69f3b57e525c2e4af96f39c6e9c854d2/PyTweening-1.0.3.zip
Requirement already satisfied: Pillow in c:\users\user\desktop\pythoncode\.venv\lib\site-packages (from pyautogui) (5.4.1)
Collecting pyscreeze (from pyautogui)
Using cached https://files.pythonhosted.org/packages/f3/27/073bf07400943e38b06ba40def60ec489d114fd7356c2db5a2f793454312/PyScreeze-0.1.19.tar.gz
Collecting pygetwindow (from pyautogui)
Using cached https://files.pythonhosted.org/packages/01/ed/56d4a369c6e18f6b239d9ef37b3222ba308bfebf949571b2611ff7d64f1d/PyGetWindow-0.0.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USer\AppData\Local\Temp\pip-install-wupkdbtd\pygetwindow\setup.py", line 11, in <module>
long_description = fh.read()
UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 903: illegal multibyte sequence
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\USer\AppData\Local\Temp\pip-install-wupkdbtd\pygetwindow\
=========================================================================================
I use 32bit windows and 32bit python 3.7
I already upgrade my pip with code pip install --upgrade pip.(current version is 19.0.2 now)
And I have tried a prompt with administration authority and type pip install pyautogui but Prompt also gave me the same error :
Command "python seup.py egg_info" failed with error code 1 in C:\Users\USer\AppData\Local\Temp\pip-install-e2r19eza\pygetwindow\
I already try the solution that the follwing link suggets but I failed
"pip install unroll": "python setup.py egg_info" failed with error code 1
I failed to do easy_install -U setuptools with an error:
WinError 5] Access is denied : 'c:\\users\\user\\desktop\\pythoncode\\.venv\\Scripts\\easy_install.exe'
Please share your wisdom to the beginner
Try to install as an Administrator.
pip install pyautogui
I'm trying to install Pyautogui on ubuntu 18.04, but I keep receiving the following error message:
$pip3 install pyautogui
Collecting pyautogui
Using cached https://files.pythonhosted.org/packages/45/70/c5d340fadb06106135b7fe9677fc6d275f3cd7f7e6f896316c4cfe6c022c/PyAutoGUI-0.9.37.tar.gz
Collecting pymsgbox (from pyautogui)
Using cached https://files.pythonhosted.org/packages/b6/65/86379ede1db26c40e7972d7a41c69cdf12cc6a0f143749aabf67ab8a41a1/PyMsgBox-1.0.6.zip
Collecting PyTweening>=1.0.1 (from pyautogui)
Using cached https://files.pythonhosted.org/packages/b9/f8/c32a58d6e4dff8aa5c27e907194d69f3b57e525c2e4af96f39c6e9c854d2/PyTweening-1.0.3.zip
Collecting Pillow (from pyautogui)
Using cached https://files.pythonhosted.org/packages/d1/24/f53ff6b61b3d728b90934bddb4f03f8ab584a7f49299bf3bde56e2952612/Pillow-5.2.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pyscreeze (from pyautogui)
Using cached https://files.pythonhosted.org/packages/c9/6e/e175fda37d76d7846a6cda8a4364dfd7c2d343139b0716c4f03194d14933/PyScreeze-0.1.17.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-6aakksn1/pyscreeze/setup.py", line 10, in <module>
with open("README.md", "r") as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-6aakksn1/pyscreeze/
Can someone help me please?
PyScreeze maintainer here. This is caused by a packaging error, which has been fixed in 0.1.18. It should work now if you install pyautogui, though you may have to delete the pip cache on your machine first.
The new release (v0.1.17) of pyscreeze fails to install as a dependency of pyautogui.
As a workaround try to install first the last working version of pyscreeze and after this pyautogui:
pip install pyscreeze<=0.1.14
pip install PyAutoGUI
I already created a new ticket for this issue https://github.com/asweigart/pyscreeze/issues/37
(some_virtual_env) # pip install channels
gives me:
Collecting channels
Using cached channels-2.0.2-py2.py3-none-any.whl
Collecting Django>=1.11 (from channels)
Using cached Django-1.11.10-py2.py3-none-any.whl
Collecting asgiref~=2.1 (from channels)
Using cached asgiref-2.1.5-py2.py3-none-any.whl
Collecting daphne~=2.0 (from channels)
Using cached daphne-2.0.3-py2.py3-none-any.whl
Requirement already satisfied: pytz in /root/.virtualenvs/codebench/lib/python2.7/site-packages (from Django>=1.11->channels)
Collecting async-timeout~=2.0 (from asgiref~=2.1->channels)
Using cached async-timeout-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-iii9a6/async-timeout/setup.py", line 1, in <module>
import pathlib
ImportError: No module named pathlib
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-iii9a6/async-timeout/
I tried upgrade setuptools as described in: https://stackoverflow.com/a/36025294/646732
It didn't work.
Tried:
(test_python3) # apt-get install python3
(test_python3) # alias python=python3
(test_python3) # pip install async-timeout
(test_python3) # python -V
Python 3.5.2
(test_python3) # pip install async-timeout
It gives me:
Collecting async-timeout
Using cached async-timeout-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-Dw6FjJ/async-timeout/setup.py", line 1, in <module>
import pathlib
ImportError: No module named pathlib
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Dw6FjJ/async-timeout/
Not sure what else to check and install.
Run below command first
sudo pip install pathlib
then
pip install channels