For one of the test with avocado on power architecture, I am getting an error for a dependency module as:
ERROR: No module named 'autotest'
I tried installing this module with pip and I am getting python 2 dependency error as below
eck_version.py", line 58, in find_desired_python
raise ValueError('Python 2.x version 2.4 or better is required')
ValueError: Python 2.x version 2.4 or better is required
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c2/3c/733f2a67e63e894256d50c58d237c1b2df9906aba0c937500b2b72fa8b86/autotest-0.16.1.tar.gz#sha256=14834ebfa1d6818c52ae99324005d605832e2e62d0039eeb4f1b7ccf9be2aa20 (from https://pypi.org/simple/autotest/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement autotest (from versions: 0.16.1, 0.16.2, 0.16.3, 0.16.4)
ERROR: No matching distribution found for autotest
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
The Python apt-package called python3-wxgtk4.0 on Ubuntu 22.04.1 LTS, as its name says, is probably build with gtk4:
$ apt-cache policy python3-wxgtk4.0
python3-wxgtk4.0:
Installed: 4.0.7+dfsg-13build1
Candidate: 4.0.7+dfsg-13build1
Version table:
*** 4.0.7+dfsg-13build1 500
500 http://ch.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
100 /var/lib/dpkg/status
But the version of this package, 4.0.7, os too old for some usage.
And when trying to install a more up-to-date version with pip, it seems that wxWidgets automagically compiles with gkt3:
$ pip3 --verbose install wxPython==4.1.1
Using pip 22.3.1 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)
Collecting wxPython==4.1.1
Using cached wxPython-4.1.1.tar.gz (66.0 MB)
Running command python setup.py egg_info
/usr/local/lib/python3.10/dist-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(
/usr/local/lib/python3.10/dist-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
/usr/local/lib/python3.10/dist-packages/setuptools/dist.py:317: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running egg_info
creating /tmp/pip-pip-egg-info-7naa9j1r/wxPython.egg-info
writing /tmp/pip-pip-egg-info-7naa9j1r/wxPython.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-7naa9j1r/wxPython.egg-info/dependency_links.txt
writing entry points to /tmp/pip-pip-egg-info-7naa9j1r/wxPython.egg-info/entry_points.txt
writing requirements to /tmp/pip-pip-egg-info-7naa9j1r/wxPython.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-7naa9j1r/wxPython.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-7naa9j1r/wxPython.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-pip-egg-info-7naa9j1r/wxPython.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/sphinx/build'
warning: no previously-included files matching '.git' found under directory 'wx'
warning: no previously-included files matching '*.pyc' found under directory 'wx'
warning: no previously-included files matching '__pycache__' found under directory 'wx'
adding license file 'LICENSE.txt'
writing manifest file '/tmp/pip-pip-egg-info-7naa9j1r/wxPython.egg-info/SOURCES.txt'
Preparing metadata (setup.py) ... done
Requirement already satisfied: pillow in /usr/local/lib/python3.10/dist-packages (from wxPython==4.1.1) (9.1.0)
Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from wxPython==4.1.1) (1.16.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from wxPython==4.1.1) (1.23.4)
Building wheels for collected packages: wxPython
Running command python setup.py bdist_wheel
/usr/local/lib/python3.10/dist-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(
/usr/local/lib/python3.10/dist-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
/usr/local/lib/python3.10/dist-packages/setuptools/dist.py:317: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running bdist_wheel
running build
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.
"/usr/bin/python3" -u build.py build
Will build using: "/usr/bin/python3"
3.10.6 (main, Nov 2 2022, 18:53:38) [GCC 11.3.0]
Python's architecture is 64bit
cfg.VERSION: 4.1.1
Running command: build
Running command: build_wx
wxWidgets build options: ['--wxpython', '--unicode', '--gtk3']
Configure options: ['--enable-unicode', '--with-gtk=3', '--enable-sound', '--enable-graphics_ctx', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--enable-autoidman', '--with-sdl']
/tmp/pip-install-e18fhds7/wxpython_2fcd6d486f1646cbac69c59578dd763b/ext/wxWidgets/configure --enable-unicode --with-gtk=3 --enable-sound --enable-graphics_ctx --enable-display --enable-geometry --enable-debug_flag --enable-optimise --disable-debugreport --enable-uiactionsim --enable-autoidman --with-sdl
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for toolkit... gtk
checking for gcc... gcc
checking whether the C compiler works... yes
(...many other checks)
I'm curious, hence my question; is it possible to tell pip to fetch wxPython==4.1.1 and to compile it using gtk4 instead of gtk3? If this ever makes sense of course.
Aside note:
The latest wxPython 4.2.0 is unfortunately buggy during the install with pip on Ubuntu 22.04.1:
$ pip3 install -U wxPython
Requirement already satisfied: wxPython in /usr/lib/python3/dist-packages (4.0.7)
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
╰─> [12 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-a9emvjpo/wxpython_892c7b008de74c9db8d68d1c5c97e8a5/setup.py", line 27, in <module>
from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
File "/tmp/pip-install-a9emvjpo/wxpython_892c7b008de74c9db8d68d1c5c97e8a5/buildtools/config.py", line 30, in <module>
from attrdict import AttrDict
File "/usr/local/lib/python3.10/dist-packages/attrdict/__init__.py", line 5, in <module>
from attrdict.mapping import AttrMap
File "/usr/local/lib/python3.10/dist-packages/attrdict/mapping.py", line 4, in <module>
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
[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.
pip install python-ghost-cursor
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
Collecting bezier
Using cached bezier-2021.2.12.tar.gz (313 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
The BEZIER_INSTALL_PREFIX environment variable must be set.
[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.
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
I'm fairly inexperienced with installing libraries and so I don't know how to set the environment variable in question. Help would be appreciated. This was all done in a specific directory in the Win10 command line.
This isn't something you did wrong, this is a bug from the bezier library which is a dependency of the package you are trying to install.
The solution is to use python version 3.9
Here is a link to the issue on github
Or here is the explanation from the maintainer.
I haven't cut a release of bezier since Python 3.10 was released, so there are no pre-built wheels for 3.10.
If you want to install pure-Python without the extension, follow the docs https://bezier.readthedocs.io/en/2021.2.12/#installing:
BEZIER_NO_EXTENSION=true
python -m pip install --upgrade bezier --no-binary=bezier
If you want to install with the binary extension (i.e. with cmake as you mentioned), from the dev docs https://bezier.readthedocs.io/en/2021.2.12/development.html#libbezier:
SRC_DIR="src/fortran/"
BUILD_DIR=".../libbezier-debug/build"
INSTALL_PREFIX=".../libbezier-debug/usr"
mkdir -p "${BUILD_DIR}"
cmake
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX:PATH="${INSTALL_PREFIX}"
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-S "${SRC_DIR}"
-B "${BUILD_DIR}"
cmake
--build "${BUILD_DIR}"
--config Debug
--target install
then you can run
BEZIER_INSTALL_PREFIX="${INSTALL_PREFIX}" python -m pip install bezier
pip install readline
WARNING: Ignoring invalid distribution -ip (c:\users\gamin\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\users\gamin\appdata\local\programs\python\python310\lib\site-packages)
Collecting readline
Using cached readline-6.2.4.1.tar.gz (2.3 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error: this module is not meant to work on Windows
[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.
WARNING: Ignoring invalid distribution -ip (c:\users\gamin\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\users\gamin\appdata\local\programs\python\python310\lib\site-packages)[enter image description here][1]
Install pyreadline instead of readline:
$pip install pyreadline
or
$python -m pip install pyreadline
Go back to your python file and type:
from pyreadline import Readline
readline = Readline()
As a result, you can use readline on Windows .
It simply isn’t meant for windows. That’s the whole answer. Pyreadline is the package for windows, you can use it for similar results
When using: pip install faster-than-requests
i get this error:
WARNING: Discarding
https://files.pythonhosted.org/packages/f0/9b/f392487c0ddb086aad681a781fbb1da4fcd2761920d20cfae18ecb724e67/faster_than_requests-21.03.03.zip#sha256=3cc247556e10c64d8897933304670c873236026b4ef9f219215b124e990c2dac
(from https://pypi.org/simple/faster-than-requests/)
(requires-python:>=3.6). Command errored out with exit status 1:
python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement
faster-than-requests (from versions: 21.3.3)
ERROR: No matching distribution found for faster-than-requests