can you help me to install kivy from vscode? - kivy

error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [11 lines of output]
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary
will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion
can be found at https://github.com/pypa/pip/issues/11453
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
install kivy in vscode from windows

Related

While running Docker build the pip dependencies installation failed

I was trying to create a docker image for a sentiment analysis application. I have the dependencies as follows:
flask
transformers
optimum[onnxruntime]
gunicorn
I have the dockerfile as below:
#Using the base image with python
FROM python:3.8-alpine3.15
#Set our working directory as app
WORKDIR /app
#Installing python dependencies
RUN pip install --upgrade pip
#COPY requirements.txt /
RUN pip install flask transformers optimum[onnxruntime] gunicorn
# Copy the models directory and app.py files
COPY ["./models", "app.py", "./"]
#Exposing the port 5000 from the container
EXPOSE 5000
#Starting the python application
ENTRYPOINT ["gunicorn", "--bind=127.0.0.1:5000", "app:app"]
But I get some errors while executing the following command:
sudo docker build -t sentiment-analysis:v001 .
The error as follows:
Downloading optimum-0.1.2-py3-none-any.whl (33 kB)
Downloading optimum-0.1.1.tar.gz (17 kB)
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'
Downloading optimum-0.1.0.tar.gz (16 kB)
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 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
Traceback (most recent call last):
File "<string>", line 7, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'optimum/version.py'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-z7_0v3f_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-z7_0v3f_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-z7_0v3f_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 482, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-z7_0v3f_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 10, in <module>
AssertionError: Error: Could not open 'optimum/version.py' due [Errno 2] No such file or directory: 'optimum/version.py'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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.
The command '/bin/sh -c pip install flask transformers optimum[onnxruntime] gunicorn' returned a non-zero code: 1
What could be the problem? Thank you in advance.
I have run my application using gunicorn with no error. Then I tried to create a docker image to deploy the application. But while creating the docker image I got the error mentioned in the post. I was expecting a docker image that could be deployed.

Could not find HDF5 installation for PyTables on M1 Mac

Running on M1 Mac, macOS Monterey 12.4, Python 3.10.3
pip install tables
Collecting tables
Using cached tables-3.7.0.tar.gz (8.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
/var/folders/6g/9c7g_2tx2sb7lp8ttwtfky640000gn/T/H5closew_79lujq.c:2:5: error: implicit declaration of function 'H5close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
H5close();
^
1 error generated.
cpuinfo failed, assuming no CPU features: No module named 'cpuinfo'
* Using Python 3.10.3 (v3.10.3:a342a49189, Mar 16 2022, 09:34:18) [Clang 13.0.0 (clang-1300.0.29.30)]
* Found cython 0.29.30
* USE_PKGCONFIG: False
.. ERROR:: Could not find a local HDF5 installation.
You may need to explicitly state where your local HDF5 headers and
library can be found by setting the ``HDF5_DIR`` environment
variable or by using the ``--hdf5`` command-line option.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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 tried the following from this GitHub Issue:
pip install cython
brew install hdf5
brew install c-blosc
export HDF5_DIR=/usr/local/
export BLOSC_DIR=/usr/local/
pip install tables
But still getting the same error. Not sure if it's due to Homebrew using a different path on M1 Macs?
The issue is that Homebrew puts the files in opt/homebrew/opt/
This fixed it for me:
export HDF5_DIR=/opt/homebrew/opt/hdf5
export BLOSC_DIR=/opt/homebrew/opt/c-blosc
Again in completion to remove confusion. Running the following in terminal on Mac M1 should work.
pip install cython
brew install hdf5
brew install c-blosc
export HDF5_DIR=/opt/homebrew/opt/hdf5
export BLOSC_DIR=/opt/homebrew/opt/c-blosc
pip install tables
A solution from here solved the issue for me:
https://github.com/freqtrade/freqtrade/issues/4162
Scroll down and see "solution" provided by camxus

Installing python module in Robomaker ROS workspace with colcon

I'm working on a cloud-based robotic application with AWS RoboMaker. I'm using ROS Kinetic, with the build tool colcon.
My robot application depends on a custom python module, which has to be in my workspace. This python module is built by colcon as a python package, not a ROS package. This page explains how to do that with catkin, but this example shows how to adapt it to colcon. So finally my workspace looks like that :
my_workspace/
|--src/
|--my_module/
| |--setup.py
| |--package.xml
| |--subfolders and python scripts...
|--some_ros_pkg1/
|--some_ros_pkg2/
|...
However the command : colcon build <my_workspace> builds all ROS packages but fails to build my python module as a package.
Here's the error I get :
Starting >>> my-module
[54.297s] WARNING:colcon.colcon_ros.task.ament_python.build:Package 'my-module' doesn't explicitly install a marker in the package index (colcon-ros currently does it implicitly but that fallback will be removed in the future)
[54.298s] WARNING:colcon.colcon_ros.task.ament_python.build:Package 'my-module' doesn't explicitly install the 'package.xml' file (colcon-ros currently does it implicitly but that fallback will be removed in the future)
--- stderr: my-module
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 'egg_info'
---
Failed <<< my-module [0.56s, exited with code 1]
I found this issue that seems correlated, and thus tried : pip install --upgrade setuptools
...Which fails with the error message :
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/7c/1b/9b68465658cda69f33c31c4dbd511ac5648835680ea8de87ce05c81f95bf/setuptools-50.3.0.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "setuptools/__init__.py", line 16, in <module>
import setuptools.version
File "setuptools/version.py", line 1, in <module>
import pkg_resources
File "pkg_resources/__init__.py", line 1365
raise SyntaxError(e) from e
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-uwFamt/setuptools/
And with pip3 install --upgrade setuptools, I get :
Defaulting to user installation because normal site-packages is not writeable
Requirement already up-to-date: setuptools in /home/ubuntu/.local/lib/python3.5/site-packages (50.3.0)
I have both Python 3.5.2 an Python 2.7, but I don't know which one is used by colcon.
So I don't know what to try next, and what the real problem is. Any help welcome !
I managed to correctly install my package and its dependencies. I develop the method below, in case it may help someone someday !
I have been mainly inspired by this old DeepRacer repository.
The workspace tree in the question is wrong. It should look like this:
my_workspace/
|--src/
|--my_wrapper_package/
| |--setup.py
| |--my_package/
| |--__init__.py
| |--subfolders and python scripts...
|--some_ros_pkg1/
|--some_ros_pkg2/
my_wrapper_package may contain more than one python custom package.
A good setup.py example is this one.
You shouldn't put a package.xml next to setup.py : colcon will only look at the dependencies declared in package.xml, and won't collect pip packages.
It may help sometimes to delete the folders my_wrapper_package generated by colcon in install/ and build/. Doing so you force colcon to rebuild and bundle from scratch.

I am trying to install docker on centos8 vagrantbox facing the error 'Downloading successful, but checksum doesn't match'

[MIRROR] containerd.io-1.2.0-3.el7.x86_64.rpm: Downloading successful, but checksum doesn't match. Calculated: ece851b2b2defa24eb3b817b14d97f31f4043a713d7367972bd2c1ef4f2788b8(sha256) Expected: 7bd1d8da7d896ead55fdea3a42100eac4c4d7800f958d3ae056d40268dec4636(sha256)
(8/21): python3-policycoreutils-2.9-9.el8.noarch.rpm 107 kB/s | 2.2 MB 00:21
[MIRROR] containerd.io-1.2.0-3.el7.x86_64.rpm: Downloading successful, but checksum doesn't match. Calculated: 3928fc6c58817b02602a249e512d7e99b7c3fe06ea5d9ff3ad46e25984ff8141(sha256) Expected: 7bd1d8da7d896ead55fdea3a42100eac4c4d7800f958d3ae056d40268dec4636(sha256)
[MIRROR] docker-ce-18.09.1-3.el7.x86_64.rpm: Downloading successful, but checksum doesn't match. Calculated: 3ddabd445a05b85aeba128da42283d3285ca8055e6a201139ee49b682942ba43(sha256) Expected: 6034f83c3bf3d5d31120ef36b3172dbb28d1ac8ae3699ed8cb33924dcef0d17a(sha256)
[MIRROR] containerd.io-1.2.0-3.el7.x86_64.rpm: Downloading successful, but checksum doesn't match. Calculated: 3914815a5c9756672d6f046929335ddff86607c29ac8a3c3fc12452a69952bf7(sha256) Expected: 7bd1d8da7d896ead55fdea3a42100eac4c4d7800f958d3ae056d40268dec4636(sha256)
[FAILED] containerd.io-1.2.0-3.el7.x86_64.rpm: No more mirrors to try - All mirrors were already tried without success
(10-11/21): docker-ce-18.09.1-3.el7.x86_64.rpm 50% [============================================== ] 1.4 MB/s | 50 MB 00:35 ETA
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: Error downloading packages:
Cannot download Packages/containerd.io-1.2.0-3.el7.x86_64.rpm: All mirrors were tried
Error: Transaction test error: package selinux-policy-targeted-3.14.3-41.el8_2.5.noarch does not verify: Header SHA1 digest: BAD (Expected ab8b3fe6b75faa65c89e64ec34986ee49924f982 != 3716bcc257255e43bc9ace1b9c4aecb6fcba3e61) package python3-policycoreutils-2.9-9.el8.noarch does not verify: Header SHA1 digest: BAD (Expected af32d12b99154706740619e0ac39289c009f1aa9 != faa84ee41c25523f2a05358d172f124370c18f99) package containerd.io-1.2.6-3.3.el7.x86_64 does not verify: no digest
''' Please help me to install docker on centos8 to fix this issue SHA1 digest: BAD '''
Try installing packages containerd manually:
yum clean packages #clean packages from failed install
dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm #install newest containerd manually
sudo yum install docker-ce docker-ce-cli #install Docker daemon and CLI
Links:
Install Docker on CentOS
Docker documentation for installation
on CentOS
Docker CentOS repository

error when install tools in docker container

I install ubuntu-14.04.4-server-amd64.iso in my VirtualBox,then I use some way to get its rootfs. after that i can the rootfs to create my docker image.the Dockerfile as following:
FROM scratch
COPY rootfs /
RUN chmod u+s /usr/bin/sudo && chmod u+s /bin/mount && chmod u+s /bin/umount
I start my docker container,then I install some tools,like minicom,wget ...,but error,the following is error msg:
root#20ca319c51e6:~$ apt-get install minicom
Reading package lists... Done
Building dependency tree
Reading state information... Done
minicom is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up libpam-systemd:amd64 (204-5ubuntu20.19) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
invoke-rc.d: unknown initscript, /etc/init.d/systemd-logind not found.
runlevel:/var/run/utmp: No such file or directory
dpkg: error processing package libpam-systemd:amd64 (--configure):
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
libpam-systemd:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
I also try to "apt-get update;apt-get upgrade",but get same error msg too,
what's should i do.need you help! thanks all :)

Resources