Trying to download/install any python libraries - python

So I'm working on an app in VS Code and I'm trying to install the (pillow) and (kivy) libraries in python and I always get this same error. Does anyone have any answers to this. It would be greatly appreciated!!
The first line below is what I type into the terminal in VS Code.
python -m pip install kivy[full]
Collecting kivy[full]
Downloading Kivy-2.1.0.tar.gz (23.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23.8/23.8 MB 7.5 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
╰─> [9 lines of output]
Collecting setuptools
Using cached setuptools-65.5.0-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting cython!=0.27,!=0.27.2,<=0.29.28,>=0.24
Downloading Cython-0.29.28-py2.py3-none-any.whl (983 kB)
-------------------------------------- 983.8/983.8 kB 3.9 MB/s eta 0:00:00
ERROR: Could not find a version that satisfies the requirement kivy_deps.gstreamer_dev~=0.3.3 (from versions: none)
ERROR: No matching distribution found for kivy_deps.gstreamer_dev~=0.3.3
[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.
Everything listed above!

Looks like you’re missing some gstreamer libraries that Kivy depends on. A quick google search led me to the PyPi package that matches what it’s asking for. Looks like the current version is 0.4 so you will need to specify 0.3.3 when you install via pip. PyPi package: gstreamer dep
Edit: Here is the exact version with the pip install command. Hope this helps.

Related

kivy install fails on github-actions while runs-on:windows-latest

I am trying to automate building binaries for windows from the python program that depends on kivy. The manual build for Linux and windows is available at FormHelper.
While building for windows with GitHub actions the action fails to install kivy.
kivy install fails on Github-actions while runs-on:windows-latest
Github actions workflow
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: compile-source-windows
on:
push:
branches: [main, master]
paths:
- "**/src/*.py"
- "**/src/*.bat"
- "**/src/*.sh"
- "**/compile-source-windows.yml"
workflow_dispatch:
# on: workflow_dispatch
defaults:
run:
working-directory: "./source/01FormHelper/src/"
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout#v3
- uses: actions/setup-python#v4
with:
python-version: "3.10"
- name: update pip and install python modules in pipenv
run: |
python -V
pip install -U pip
pip install pipenv
pip install Kivy
pip install kivy pyinstaller beautifulsoup4 setuptools cython
pipenv install cython
pipenv install kivy
pipenv install Kivy
it works on ubuntu-latest
error log
Installing kivy...
Error: An error occurred while installing kivy!
Error text: Collecting kivy
Downloading Kivy-2.1.0.tar.gz (23.8 MB)
--------------------------------------- 23.8/23.8 MB 28.4 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
error: subprocess-exited-with-error
� pip subprocess to install build dependencies did not run successfully.
\u2502 exit code: 1
\u2570\u2500> [13 lines of output]
Collecting setuptools
Downloading setuptools-66.1.1-py3-none-any.whl (1.3 MB)
---------------------------------------- 1.3/1.3 MB 26.6 MB/s eta
0:00:00
Collecting wheel
Downloading wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting cython!=0.27,!=0.27.2,<=0.29.28,>=0.24
Downloading Cython-0.29.28-py2.py3-none-any.whl (983 kB)
------------------------------------- 983.8/983.8 kB 20.7 MB/s eta
0:00:00
Collecting kivy_deps.gstreamer_dev~=0.3.3
Downloading kivy_deps.gstreamer_dev-0.3.3-cp311-cp311-win_amd64.whl
(3.9 MB)
---------------------------------------- 3.9/3.9 MB 35.2 MB/s eta
0:00:00
ERROR: Could not find a version that satisfies the requirement
kivy_deps.sdl2_dev~=0.4.5 (from versions: 0.5.1)
ERROR: No matching distribution found for kivy_deps.sdl2_dev~=0.4.5
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.
\u2502 exit code: 1
\u2570\u2500> See above for output.
note: This error originates from a subprocess, and is likely not a problem with
pip.
Installation Failed
Installing Kivy...
Error: An error occurred while installing Kivy!
Error text: Collecting kivy
Using cached Kivy-2.1.0.tar.gz (23.8 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
error: subprocess-exited-with-error
� pip subprocess to install build dependencies did not run successfully.
\u2502 exit code: 1
\u2570\u2500> [10 lines of output]
Collecting setuptools
Using cached setuptools-66.1.1-py3-none-any.whl (1.3 MB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting cython!=0.27,!=0.27.2,<=0.29.28,>=0.24
Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
Collecting kivy_deps.gstreamer_dev~=0.3.3
Using cached kivy_deps.gstreamer_dev-0.3.3-cp311-cp311-win_amd64.whl
(3.9 MB)
ERROR: Could not find a version that satisfies the requirement
kivy_deps.sdl2_dev~=0.4.5 (from versions: 0.5.1)
ERROR: No matching distribution found for kivy_deps.sdl2_dev~=0.4.5
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.
\u2502 exit code: 1
\u2570\u2500> See above for output.
note: This error originates from a subprocess, and is likely not a problem with
pip.
Installation Failed

Python Newscatcher throws errors [duplicate]

This question already has answers here:
Error while downloading the requirements using pip install (setup command: use_2to3 is invalid.)
(6 answers)
Closed 3 months ago.
When I try to install Newscatcher in the Conda virtual env (Python 3.7.13), it throws the following errors;
I tried the following way;
pip install git+https://github.com/kotartemiy/newscatcher.git
Following is the error;
Collecting git+https://github.com/kotartemiy/newscatcher.git
Cloning https://github.com/kotartemiy/newscatcher.git to /tmp/pip-req-build-d53hkjlh
Running command git clone --filter=blob:none --quiet https://github.com/kotartemiy/newscatcher.git /tmp/pip-req-build-d53hkjlh
Resolved https://github.com/kotartemiy/newscatcher.git to commit b86b1a650241be4e82941319698e01a33c0c01ac
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: requests<3.0.0,>=2.23.0 in ./anaconda3/envs/bot/lib/python3.7/site-packages (from newscatcher==0.2.0) (2.28.1)
Collecting tldextract<3.0.0,>=2.2.2
Using cached tldextract-2.2.3-py2.py3-none-any.whl (48 kB)
Collecting feedparser<6.0.0,>=5.2.1
Using cached feedparser-5.2.1.zip (1.2 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 in feedparser setup command: use_2to3 is invalid.
[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.
If someone could explain me what is this error all about, I can solve it I guess. Any input is much appreciated!
The module you're trying to install is a bit old (3 years), however, setup tools removed support for 2to3 during builds.
Try downgrading setup tools:
pip install "setuptools<58.0.0"
And then
pip install newscatcher --upgrade

Kivy pip subprocess to install build dependencies did not run successfully

When I try to pip install kivy on my windows 10 cmd prompt, I get this error
Collecting kivy
Using cached Kivy-2.1.0.tar.gz (23.8 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Collecting setuptools
Using cached setuptools-65.5.1-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting cython!=0.27,!=0.27.2,<=0.29.28,>=0.24
Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
Collecting kivy_deps.gstreamer_dev~=0.3.3
Using cached kivy_deps.gstreamer_dev-0.3.3-cp311-cp311-win_amd64.whl (3.9 MB)
ERROR: Could not find a version that satisfies the requirement kivy_deps.sdl2_dev~=0.4.5 (from versions: 0.5.1)
ERROR: No matching distribution found for kivy_deps.sdl2_dev~=0.4.5
[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.
How can I fix this?
I wanted to pip install kivy but it didn't work
Kivy is currently unavailable for python 3.11, it works just fine when using 3.10.8.. use an older version of python while waiting for them to be available.

Unable To Install Kivy

pip install kivy
Collecting kivy
Using cached Kivy-2.1.0.tar.gz (23.8 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Collecting setuptools
Using cached setuptools-65.5.1-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting cython!=0.27,!=0.27.2,<=0.29.28,>=0.24
Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
Collecting kivy_deps.gstreamer_dev~=0.3.3
Using cached kivy_deps.gstreamer_dev-0.3.3-cp311-cp311-win_amd64.whl (3.9 MB)
ERROR: Could not find a version that satisfies the requirement kivy_deps.sdl2_dev~=0.4.5 (from versions: 0.5.1)
ERROR: No matching distribution found for kivy_deps.sdl2_dev~=0.4.5
[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.
from their docs
Kivy 2.1.0 officially supports Python versions 3.7 - 3.10.
you are using 3.11. Try using python 3.10
(although from your prints it looks like they are in the process of supporting 3.11 (since it could install other kivy specific requirements for 3.11))

fail installing keybert on python 3.10.4

I'm trying to install keybert on python 3.10.4, but it fails on the installation of the scikit-learn library stating a dependencies confilc on Numpy as below:
ScreenShot of CMD terminal
Using cached meson-0.62.2-py3-none-any.whl (864 kB)
Collecting Cython<3.0,>=0.29.21
Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Collecting pybind11<2.11.0,>=2.4.3
Using cached pybind11-2.10.0-py3-none-any.whl (213 kB)
Collecting pythran<0.12.0,>=0.9.12
Using cached pythran-0.11.0-py3-none-any.whl (4.2 MB)
Collecting wheel<0.38.0
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting numpy==1.22.3
Using cached numpy-1.22.3-cp310-cp310-win32.whl (12.2 MB)
ERROR: Cannot install numpy==1.21.6 and numpy==1.22.3 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested numpy==1.22.3
The user requested numpy==1.21.6
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
[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.
I have tried to do it in a new virtual env but same.
Tried to install Numpy 1.22.3 first, then the sciKit-learn library independently but I'm getting the same dependencies conflict over and over.
How to resolve this problem?

Categories