pip install "kivy[base]" kivy_examples:
Collecting kivy[base]
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.6.3-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 to fix? if you could help me. I am receiving this error is it my python verson? or the kivy version what could it be.
I tried using these verions:
python -m pip install kivy --pre --no-deps --index-url https://kivy.org/downloads/simple/
python -m pip install "kivy[base]" --pre --extra-index-url https://kivy.org/downloads/simple/
but they dont work properly, has a lot of bugs and malfunctions
There is no wheel for Kivy and Python 3.11 yet.
You have to build Kivy from source. You can do that using the following commands. I am doing it in a virtual environment to keep it separate from the main system.
python3.11 -m virtualenv Kivy_Py3.11
cd Kivy_Py3.11
source bin/activate
git clone https://github.com/kivy/kivy.git
cd Kivy_py3.11
python -m pip install -e ".[base]"
python -m pip install kivymd
pip freeze
Kivy will now be installed and the 'pip freeze' should show: (version number will probably be different)
certifi==2022.12.7
charset-normalizer==2.1.1
docutils==0.19
idna==3.4
-e git+https://github.com/kivy/kivy.git#a7c66880270a93821e1f8ecd613409f008fd2ce8#egg=Kivy
Kivy-Garden==0.1.5
KivyMD==1.1.1
Pillow==9.3.0
Pygments==2.13.0
requests==2.28.1
urllib3==1.26.13
If you want to use the nightly build of Kivy that is more compatiable with Python 3.11 then you can just run these command.
python3.11 -m pip install kivy --pre --no-deps --index-url https://kivy.org/downloads/simple/
python3.11 -m pip install "kivy[base]" --pre --extra-index-url https://kivy.org/downloads/simple/
python3.11 -m pip install https://github.com/kivymd/KivyMD/archive/master.zip
I had the same issue and it was rectified by downgrading to 3.10 and it works.
Related
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.
╰─> python_bcrypt
I can't install the python_bcrypt in visual studio code anyone know how?
This is could be an issue of wheel package. Some projects don't have wheel package in their source. I tried doing the same on my machine. It's running Python v 3.10.7 and pip v 22.3.1. I faced some warnings but no errors during the installation.
pip install python_bcrypt
Collecting python_bcrypt
Downloading python-bcrypt-0.3.2.tar.gz (19 kB)
Preparing metadata (setup.py) ... done
Installing collected packages: python_bcrypt
DEPRECATION: python_bcrypt 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 python_bcrypt ... done
Successfully installed python_bcrypt-0.3.2
I would say try upgrading your pip, setuptools, wheels
python.exe -m pip install --upgrade pip
pip3 install wheel setuptools pip --upgrade
os: centos7.6
python 3.8
occur error:
Collecting airflow
Using cached airflow-0.6.tar.gz (1.2 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]
ERROR: Can not execute setup.py since setuptools is not available in the build environment.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
maybe this help
python -m pip uninstall setuptools
pip install setuptools
pip install airflow
This is simply saying the build tool setup.py fails to build from source.
I am not so technical in the aspect of building from source, so I can't tell you exactly what to do with your .tar.gz file to make it all right.
If you have pip installed on the machine (which I assume you do), then simply type:
pip install apache-airflow
The long version:
python3 -m pip install apache-airflow
If you intend to use celery together with Apache Airflow, I suggest:
python3 -m pip install apache-airflow[celery] for full installation.
Refer to the documentation of Apache Airflow for more info.
I've been trying to install jupyter for the past 2 hours and I keep getting this error:
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pywinpty
Failed to build pywinpty
ERROR: Could not build wheels for pywinpty, which is required to install pyproject.toml-based projects
I tried installing pywinpty by itself (pip intstall pywinpty in cmd) and it gives the same wheels error.
I used this guide from jupyter to attempt installation: https://docs.jupyter.org/en/latest/install/notebook-classic.html
Just try using
python -m pip install --upgrade pip
If that doesn't work, Try this as Admin in cmd
pip uninstall pip
and then,
python -m ensurepip
I'm building a docker image on cloud server via the following docker file:
# base image
FROM python:3
# add python file to working directory
ADD ./ /
# install and cache dependencies
RUN pip install --upgrade pip
RUN pip install RUST
RUN pip install transformers
RUN pip install torch
RUN pip install slack_sdk
RUN pip install slack_bolt
RUN pip install pandas
RUN pip install gensim
RUN pip install nltk
RUN pip install psycopg2
RUN pip install openpyxl
......
When installing the transformers package, the following error occurs:
STEP 5: RUN pip install transformers
Collecting transformers
Downloading transformers-4.15.0-py3-none-any.whl (3.4 MB)
Collecting filelock
......
Downloading click-8.0.3-py3-none-any.whl (97 kB)
Building wheels for collected packages: tokenizers
Building wheel for tokenizers (pyproject.toml): started
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp_3y7hw5q
cwd: /tmp/pip-install-bsy5f4da/tokenizers_e09b9f903acd40f0af4a997fe1d8fdb4
Complete output (50 lines):
running bdist_wheel
......
copying py_src/tokenizers/trainers/__init__.pyi -> build/lib.linux-x86_64-3.10/tokenizers/trainers
copying py_src/tokenizers/tools/visualizer-styles.css -> build/lib.linux-x86_64-3.10/tokenizers/tools
running build_ext
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
----------------------------------------
ERROR: Failed building wheel for tokenizers
ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects
Building wheel for tokenizers (pyproject.toml): finished with status 'error'
Failed to build tokenizers
subprocess exited with status 1
subprocess exited with status 1
error building at STEP "RUN pip install transformers": exit status 1
time="2022-01-18T07:24:56Z" level=error msg="exit status 1"
Dockerfile build failed - exit status 1exit status 1
I'm not very sure about what's happening here. Can anyone help me? Thanks in advance.
The logs say
error: can't find Rust compiler
You need to install a rust compiler. See https://www.rust-lang.org/tools/install. You can modify the installation instructions for a docker image like this (from https://stackoverflow.com/a/58169817/5666087):
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
Just use a clean python=3.8 environment and try again.
Consider the usual scenario - I want to create a virtual environment and install some packages. Say
python3 -m venv venv
source venv/bin/activate
pip install databricks-cli
During the installation, I get an error
Building wheels for collected packages: databricks-cli
Building wheel for databricks-cli (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/paulius/Documents/wheeltest/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m7jmyh1m/databricks-cli/setup.py'"'"'; __file__='"'"'/tmp/pip-install-m7jmyh1m/databricks-cli/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-maxix98x
cwd: /tmp/pip-install-m7jmyh1m/databricks-cli/
Complete output (8 lines):
/tmp/pip-install-m7jmyh1m/databricks-cli/setup.py:24: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for databricks-cli
While it is benign (the installation actually works), it is still annoying.
I know that pip install wheel resolves this, but wheel does not come with the virtual environment by default. So should I always add it to my requirements.txt, or maybe this is something that can be solved by the package maintainer (in this case databricks-cli) and hence I should open an issue in their Github?
Update: note that the wheel is not necessary to install wheels, in this example bunch of dependencies get successfully downloaded and installed as wheels. The only databricks-cli package gets the error, as it does not have a wheel, but for some reason, pip tries to build it.
Update 3:
To prevent it from the maintainer's perspective use:
setup_requires=["wheel"]
it looks like you're on Linux and using the pre-installed or otherwise modified Python and its setuptools.
I've experienced the same thing due to Debian cutting off parts of the packages in not quite a sane way and I have mainly had issues with the prebuilt python-setuptools and likes. Check if the version matches and if not, install setuptools from pip, that might help in the future.
I have setuptools 45.2.0 and had no issues installing the package as a wheel. Then I uninstalled wheel and dropped the cache dir and it installed it properly even from the tar.gz source.
Update 2:
It might or might not be resolved by requiring wheel package. If the setup.py expects bdist_wheel to be present prior to the installation (most likely), adding it to the setup() function will not help and a manual check for the package within the setup script (+ perhaps a reference in README) are necessary so an end-user can install it properly.
For example if it's not present on the system, just print a warning and call an exit(). That would be the least a maintainer should do.
Update:
Yes, in the case where you encounter bdist_wheel command missing you need to install wheel with pip instal wheel.
It's not required, but it's recommended. Pip will work just fine without wheels, but you'll be installing from source (tar.gz, .zip or .egg).
See the packaging discussion for whether to use wheel or egg (or source).
This was a pip bug, and the solution is to upgrade the pip. With the newest version things look fine:
(venv) paulius#xps:~/Documents/wheeltest$ pip install databricks-cli
Collecting databricks-cli
Using cached databricks-cli-0.14.3.tar.gz (54 kB)
Collecting click>=6.7
Using cached click-8.0.1-py3-none-any.whl (97 kB)
Collecting requests>=2.17.3
Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting six>=1.10.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting tabulate>=0.7.7
Using cached tabulate-0.8.9-py3-none-any.whl (25 kB)
Collecting idna<4,>=2.5
Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.1-py3-none-any.whl (35 kB)
Using legacy 'setup.py install' for databricks-cli, since package 'wheel' is not installed.
Installing collected packages: urllib3, idna, charset-normalizer, certifi, tabulate, six, requests, click, databricks-cli
Running setup.py install for databricks-cli ... done
Successfully installed certifi-2021.5.30 charset-normalizer-2.0.1 click-8.0.1 databricks-cli-0.14.3 idna-3.2 requests-2.26.0 six-1.16.0 tabulate-0.8.9 urllib3-1.26.6
Note the Using legacy 'setup.py install' ... line.
This is a related issue in the pip github https://github.com/pypa/pip/issues/8302. Not exactly that, but there is an explanation in the comments on what's the wheel building logic supposed to by.