Completely new to python, running command ‘pip install -U wxPython’ in Command line and this is the error I get:
C:\Users\Pikachu>pip install -U wxPython
Collecting wxPython
Using cached wxPython-4.1.1.tar.gz (66.0 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pillow in c:\users\pikachu\appdata\local\programs\python\python310\lib\site-packages (from wxPython) (9.1.0)
Requirement already satisfied: six in c:\users\pikachu\appdata\local\programs\python\python310\lib\site-packages (from wxPython) (1.16.0)
Requirement already satisfied: numpy in c:\users\pikachu\appdata\local\programs\python\python310\lib\site-packages (from wxPython) (1.22.3)
Using legacy 'setup.py install' for wxPython, since package 'wheel' is not installed.
Installing collected packages: wxPython
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
╰─> [51 lines of output]
C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:717: 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:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:294: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running install
running build
C:\Users\Pikachu\AppData\Local\Temp\pip-install-2h0mnbul\wxpython_9be5f59f193e4bde8c6b8e211acc73c3\build.py:41: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.dep_util import newer, newer_group
Will build using: "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\python.exe"
3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
Python's architecture is 64bit
cfg.VERSION: 4.1.1
Running command: build
Running command: build_wx
Command '"C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\python.exe" -c "import setuptools, distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(mc.cc)"' failed with exit code 1.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\msvc.py", line 140, in msvc9_query_vcvarsall
return EnvironmentInfo(arch, ver).return_env()
File "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\msvc.py", line 1740, in return_env
[self.VCIncludes,
File "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\msvc.py", line 1282, in VCIncludes
return [join(self.si.VCInstallDir, 'Include'),
File "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\msvc.py", line 840, in VCInstallDir
raise distutils.errors.DistutilsPlatformError(msg)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.2 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Finished command: build_wx (0.228s)
Finished command: build (0.228s)
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:\Users\Pikachu\AppData\Local\Programs\Python\Python310\python.exe" -u build.py build
Command '"C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\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
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
My installer doesn't see the new "VisualStudio". This helped me. Maybe you too.
Download source:
wxPython-4.1.2a1-cp310-cp310-win_amd64.whl
Install:
pip install _your_path_to_src_\wxPython-4.1.2a1-cp310-cp310-win_amd64.whl
Test:
python -c "import wx; print(wx.version());"
Posible output if everything is correct: 4.1.2a1 msw (phoenix) wxWidgets 3.1.5
More details:
https://gist.github.com/oleksis/8637f096b97e18e00786e46465e97b34
Related
I couldn't install it in any way, I wonder what could be the cause of the error.
I installed C++ and other necessary stuff
I am using windows 11
I installed pip install nvidia-pyindex with no problem.
Same as tensorrt I can't install pycuda library and I get same error
\`
(base) PS C:\\Users\\byara\> pip install nvidia-tensorrt
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting nvidia-tensorrt
Downloading nvidia-tensorrt-0.0.1.dev5.tar.gz (7.9 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─\> \[17 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\\byara\\AppData\\Local\\Temp\\pip-install-ak3sxwfw\\nvidia-tensorrt_a7512906bd3241728853c0e6a10bf9d4\\setup.py", line 150, in \<module\>
raise RuntimeError(open("ERROR.txt", "r").read())
RuntimeError:
\###########################################################################################
The package you are trying to install is only a placeholder project on PyPI.org repository.
This package is hosted on NVIDIA Python Package Index.
This package can be installed as:
`
$ pip install nvidia-pyindex
$ pip install nvidia-tensorrt
`your text`
###########################################################################################
[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.
\`
TensorRT is not available for Windows via pip. You can verify that by looking at the wheel files in PyPI, link. All the wheel files for the latest version are for Linux. Thus, trying to install on Windows will pick the previous releases, which were place-holder packages. Those releases just print the message you are seeing, on all OSes.
According to the documentation
The zip file is the only option currently for Windows.
You can find instructions on how to install at Zip File Installation.
(tensorholo) C:\Users\alaba\Desktop\MIT PROJECT\tensor_holography-main>pip install nvidia-tensorflow[horovod]
Collecting nvidia-tensorflow[horovod]
Downloading nvidia-tensorflow-0.0.1.dev5.tar.gz`` (7.9 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [19 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\alaba\AppData\Local\Temp\pip-install-ztjzt002\nvidia-tensorflow_001bf7a090024c37a3c7ff91374ac7c4\setup.py", line 150, in <module>
raise RuntimeError(open("ERROR.txt", "r").read())
RuntimeError:
###########################################################################################
The package you are trying to install is only a placeholder project on PyPI.org repository.
This package is hosted on NVIDIA Python Package Index.
This package can be installed as:
```
$ pip install nvidia-pyindex
$ pip install nvidia-tensorflow
```
Please refer to NVIDIA instructions: https://github.com/NVIDIA/tensorflow#install.
###########################################################################################
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.
nvidia-tensorflow[horovod] package doesn't support the Windows platform. You'd need to run it inside a WSL2 (Windows Subsystem for Linux version 2) to make it work on Windows.
Like the official docs say:
The nvidia-tensorflow package includes CPU and GPU support for Linux.
And also this issue on the same repository:
I am writing a program that splits a video into frames and extract the text of every nth frame using opencv-python and pytesseract. I managed to get the code working, but the program was working rather slowly. I tried to use PyPy3 to improve performance but ran into an issue installing the opencv library for pypy.
This is the error code:
Collecting opencv-python
Using cached opencv-python-4.6.0.66.tar.gz (90.3 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: numpy>=1.14.5 in /usr/local/Cellar/pypy3/7.3.9/libexec/site-packages (from opencv-python) (1.21.6)
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (pyproject.toml): started
Building wheel for opencv-python (pyproject.toml): finished with status 'error'
Failed to build opencv-python
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
error: subprocess-exited-with-error
× Building wheel for opencv-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
Traceback (most recent call last):
File "/private/var/folders/55/4bdtvdzn54n8npg5kfybcvq40000gp/T/pip-build-env-_2gw8fsy/overlay/site-packages/skbuild/setuptools_wrap.py", line 613, in setup
cmkr = cmaker.CMaker(cmake_executable)
File "/private/var/folders/55/4bdtvdzn54n8npg5kfybcvq40000gp/T/pip-build-env-_2gw8fsy/overlay/site-packages/skbuild/cmaker.py", line 141, in __init__
self.cmake_version = get_cmake_version(self.cmake_executable)
File "/private/var/folders/55/4bdtvdzn54n8npg5kfybcvq40000gp/T/pip-build-env-_2gw8fsy/overlay/site-packages/skbuild/cmaker.py", line 96, in get_cmake_version
"Problem with the CMake installation, aborting build. CMake executable is %s" % cmake_executable
Problem with the CMake installation, aborting build. CMake executable is cmake
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for opencv-python
ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects
I feel like I tried everything. I successfully installed all other dependencies using
pypy3 -m pip install [package]
Yes, I already upgraded my pip, setuptools and wheels to the latest version.
Any other relevant information:
interpreter path: /usr/local/bin/pypy3
Python version: PyPy 7.3.9 [Python 3.7.13]
OS: MacOS
What I understand is that the error lies with building the wheels and I read something about building the package myself. I couldn't figure it out tho. Any help would be much appreciated.
EDIT:
I installed cmake using brew install cmake. Now when I try to install opencv-python, instead of raising an ERROR, the cmd gets stuck at
Building wheel for opencv-python (pyproject.toml) ... |
The error message states that it may be linked to cmake, You can try to install it. -> https://cmake.org/install/
Collecting cryptography
Downloading cryptography-37.0.2.tar.gz (585 kB)
-------------------------------------- 585.4/585.4 kB 7.4 MB/s eta 0:00:00
Installing build dependencies ... error
error: subprocess-exited-with-error
pip subprocess to install build dependencies did not run successfully.
exit code: 1
[41 lines of output]
Collecting setuptools!=60.9.0,>=40.6.0
Using cached setuptools-62.3.1-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting cffi>=1.12
Using cached cffi-1.15.0.tar.gz (484 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[16 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/####/AppData/Local/Temp/pip-install-myhhpkap/cffi_c72832fd79d3476b80c36655663d2237/setup.py", line 126, in <module>
if sys.platform == "win32" and uses_msvc():
File "C:/Users/####/AppData/Local/Temp/pip-install-myhhpkap/cffi_c72832fd79d3476b80c36655663d2237/setup.py", line 105, in uses_msvc
return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
File "C:/msys64/mingw64/lib/python3.9/site-packages/setuptools/_distutils/command/config.py", line 225, in try_compile
self._compile(body, headers, include_dirs, lang)
File "C:/msys64/mingw64/lib/python3.9/site-packages/setuptools/_distutils/command/config.py", line 132, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "C:/msys64/mingw64/lib/python3.9/site-packages/setuptools/_distutils/_msvccompiler.py", line 327, in compile
self.initialize()
File "C:/msys64/mingw64/lib/python3.9/site-packages/setuptools/_distutils/_msvccompiler.py", line 218, in initialize
raise DistutilsPlatformError("--plat-name must be one of {}"
distutils.errors.DistutilsPlatformError: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
[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.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
pip subprocess to install build dependencies did not run successfully.
exit code: 1
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Pip and setuptools are both completely up to date, I have rust installed, and linked to the x86_64-pc-windows-gnu toolchain, and I have the C++ tools from VS. I have even tried completely reinstalling msys2 and it still gives me the same error every single time. I have gotten this installed this way before so I know it is possible, but it was on a different machine and I didn't run into this issue. I am really at a loss as to how to get this installed so any help would be greatly appreciated.
Edit: So after a bit more hunting and searching. I realized that there is a msys2 package for the cryptography library that you need to use instead of trying to use pip. As far as I can tell there is some sort of compilation error that results from running it in the msys2 environment instead of a windows terminal that is causing it. Here is the package I used https://packages.msys2.org/package/mingw-w64-x86_64-python3-cryptography
Please help. Tried most of the solutions I could find online, and as the last resort, posting it on stackoverflow.
The error I get while trying to install the Pendulum package is as below:
C:\WINDOWS\system32>pip install pendulum Collecting pendulum Using cached pendulum-2.1.0.tar.gz (80 kB) Installing build dependencies ... done Getting requirements to build wheel ... done
Preparing wheel metadata ... done Collecting pytzdata>=2018.3 Using cached pytzdata-2019.3-py2.py3-none-any.whl (489 kB) Requirement already satisfied: python-dateutil<3.0,>=2.6 in c:\python\python38-32\lib\site-packages (from pendulum) (2.8.1) Requirement already satisfied: six>=1.5 in c:\users\cuser\appdata\roaming\python\python38\site-packages (from python-dateutil<3.0,>=2.6->pendulum) (1.14.0) Building wheels for collected packages: pendulum Building wheel for pendulum (PEP 517) ... error ERROR: Command errored out with exit status 1: command: 'c:\python\python38-32\python.exe' 'c:\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\cuser\AppData\Local\Temp\tmpkbrn91g9'
cwd: C:\Users\cuser\AppData\Local\Temp\pip-install-q2vfs50o\pendulum Complete output (24 lines): Traceback (most recent call last):
File "setup.py", line 2, in <module>
from setuptools import setup ModuleNotFoundError: No module named 'setuptools' Traceback (most recent call last):
File "c:\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 257, in <module>
main()
File "c:\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "c:\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 181, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "C:\Users\cuser\AppData\Local\Temp\pip-build-env-nvwxlarh\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 57, in build_wheel
return unicode(WheelBuilder.make_in(poetry, Path(wheel_directory)))
File "C:\Users\cuser\AppData\Local\Temp\pip-build-env-nvwxlarh\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 56, in make_in
wb.build()
File "C:\Users\cuser\AppData\Local\Temp\pip-build-env-nvwxlarh\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 82, in build
self._build(zip_file)
File "C:\Users\cuser\AppData\Local\Temp\pip-build-env-nvwxlarh\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 102, in _build
self._run_build_command(setup)
File "C:\Users\cuser\AppData\Local\Temp\pip-build-env-nvwxlarh\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 130, in _run_build_command
subprocess.check_call(
File "c:\python\python38-32\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['c:\\python\\python38-32\\python.exe', 'setup.py', 'build', '-b', 'build']' returned non-zero exit status 1.
---------------------------------------- ERROR: Failed building wheel for pendulum Failed to build pendulum ERROR: Could not build wheels for pendulum which use PEP 517 and cannot be installed directly
The current python version and package versions are as below:
Python 3.8.2
Package Version
----------------- -------
astroid 2.3.3
colorama 0.4.3
cx-Oracle 7.3.0
ez-setup 0.9
isort 4.3.21
lazy-object-proxy 1.4.3
mccabe 0.6.1
numpy 1.18.2
pandas 1.0.3
pip 20.0.2
pylint 2.4.4
python-dateutil 2.8.1
pytz 2019.3
setuptools 46.1.3
six 1.14.0
SQLAlchemy 1.3.15
wheel 0.34.2
wrapt 1.11.2
OS version:
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.17763 N/A Build 17763
This appears to be the result of two mistakes in how Pendulum is configured.
The first mistake is that the Windows wheels have the wrong name. See https://github.com/sdispater/pendulum/issues/456.
Therefore Pip is trying to fall back to building from source. I'm not sure what exactly is wrong here, but something is misconfigured in Pendulum such that the installation does not work with modern versions of Pip. See https://github.com/sdispater/pendulum/issues/454.
There are two workaround solutions:
Downgrade Pip to version 18.1. This worked for me personally.
Install Poetry into your project environment and then install Pendulum with the --no-build-isolation option, as described by #Wes here: https://github.com/sdispater/pendulum/issues/454#issuecomment-605519477
I would prefer to temporarily downgrade Pip until this is fixed, rather than make a mess of my project environment. So I went with the first option. You should choose whatever makes more sense for your workflow, until this problem is fixed.
For now, you can try this:
pip install pendulum==2.0.5
Downgrade to pip version 18.1 then install pendulum
pip install pip==18.1 && pip install pendulum