Python: Showing unmet dependencies error and broken packages error despite not having any such packages - python

We were trying to run a shell script for installing prerequistes(install_prerequistes_onnx.sh) for OpenVINO Model Optimizer but we got the following error:
The Error
We tried resolving it using python 3.6.7 in a virtual environment(tsc). But it was of no use. Also we do not have any broken packages(we checked for them explicitly) but it still shows "unable to correct problems, you have held broken packages".
Can anyone explain the last three lines of the error? Also what does "error in line 78" imply, since our notebook was running fine before incorporating OpenVINO.
PS: We are using Ubuntu 18.04.

Please ensure that you’ve installed external software dependencies.
You may refer to this link for the installation:
https://docs.openvinotoolkit.org/2021.3/openvino_docs_install_guides_installing_openvino_linux.html#install-external-dependencies
For your virtual environment, the broken packages error that you’re facing is due to the Python’s dependency package version is not available on your system.
Try with this command: sudo apt update && sudo apt upgrade
If the issue still persists, you may need to re-install Python.

Related

How can i solve the following problem with pip?[Could not install packages due to an OSError]

My virtual environment is accidentally not working. i found out this message when i tried to add new package to my virtual environment My problem is as following:
I've run this command.[$ pip install <package_name>]
But i met an error message.
ERROR: Could not install packages due to an OSError: Missing dependencies for SOCKS support.
How can i fix the error? I need detailed information.
what did i try?
1.upgrade my pip version.
2.create new VENV(for python project).
How can i fix the error? pls, I need detailed information.
Try writing "pip3 install <package_name>"
Sometimes depending on what compiler or OS you are using there could be differences in installing packages. I had the same problem a while ago and writing "pip3" instead of just "pip" fixed the problem for me.
However, from the error code you're getting, that may not be the case. I assume you are on ubuntu so I would suggest running
$ env | grep -i proxy
then
$ unset socks_proxy

Issues installing Jupyter Notebooks - Python 3.9 - Windows 10

I am having issues installing Jupyter Notebook. I will preface this by saying I have an elementary understanding of coding and how to properly set up my environment. When using the pip command pip install jupyter it begins processing, but I end up with the following error. One issue that I may have is a long file name, but I am unsure how to correct that considering I have never physically used this path. I also have a space between my first and last name in my user folder which may be causing the issue. It is my understanding that changing my username could cause unanticipated downstream issues, so I have not tried to change it.
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\FirstName LastName\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\jedi\\third_party\\typeshed\\third_party\\2and3\\requests\\packages\\urllib3\\packages\\ssl_match_hostname\\_implementation.pyi'
I have also tried the following syntax which both end with the above error
pip install --upgrade --force-reinstall jupyter
pip3 install --upgrade --force-reinstall jupyter
I tried installing both Anaconda and git bash. When I try to open through Anaconda, it acts like it is processing to open, then just stops and nothing happens.
Using git bash, I have tried the following command. I don't get any errors, but it also does not solve my problem.
Anaconda3/Scripts/activate
This seems to be a pretty common problem, so I am surprised I haven’t been able to solve it myself. What am I missing?
Edit: This is solved, thank you #Dschoni. Using the Anaconda prompt, I typed jupyter notebook and it opened.
I was getting this error when I installed Python on my Windows 10 machine through the Microsoft Store. Once I uninstalled it and installed the version downloaded from the official https://www.python.org/downloads/ this error did not happen anymore.

File already exists in database error from Protobuf when deploying Google Dataflow template after MacOS Catalina upgrade

I have a project that uses Google Dataflow. I have been successfully using the following command (and commands like it) for months to deploy templates.
.venv/bin/python -m dataflow.registry_files.delimited_file --runner=DataflowRunner --region=us-central1 --project=myproject --staging_location=gs://mybucket-staging/staging/gr265 --template_location=gs://mybucket-code/templates/gr265 --temp_location=gs://mybucket-staging/temp/gr265 --no_use_public_ips --save_main_session --setup_file=dataflow/setup.py --projectId=myproject --datasetId=padl_staging --tableId=gr265 --configFile=gs://mybucket-code/registry/registry_files.yaml --fileType=gr265
This command continues to work on windows 10 and Debian machines in my team.
Since I upgraded to catalina (10.15.1, with python 3.7.5 and apache-beam==2.16.0 ) I get the following error:
[libprotobuf ERROR google/protobuf/descriptor_database.cc:58] File already exists in database:
[libprotobuf FATAL google/protobuf/descriptor.cc:1370] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
libc++abi.dylib: terminating with uncaught exception of type google::protobuf::FatalException: CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
Abort trap: 6
I have done all of the following, with many reboots:
Run xcode-select --install
Run brew update-reset, brew update, brew upgrade, and brew reinstall python all to no effect (except after brew update-reset, brew doctor works again)
Run brew uninstall protobuf and brew install protobuf
Run pip3 uninstall protobuf outside of the virtual environments
Deleted and re-created my virtual environments from their requirements files.
Several bits of voodoo involving /usr/local/include that I located elsewhere on stack overflow that didn't help.
I wondered if this was just my machine, and unfortunately was able to reproduce it on the other macOS Catalina laptop in my team, but not the laptop still running macOS Mojave.
According with the Apache Beam Issue 8368 this issue is related with a pyarrow version, you have to test with pyarrow 0.15.1 beam since is the one which works on MacOS 10.15 as is mentioned in this link.
Please let us know how it works.
I just leave it here, because it is a common problem has not resolved by maintainers and I didn't found the closest convenient solution in the time.
https://github.com/protocolbuffers/protobuf/issues/1941
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=721791;filename=protobuf-2.4.1-3.1.debdiff;msg=5
The patch actually quite does not help, because in the next step the protobuf does hang in the Run function and call does not return.
The closest solution for myself was to completely avoid of any double linkage with the protobuf at any cost.

Setuptools error when trying to install a package

I’m completely new to Python and I want to install the package py-webrtcvad in Windows 7, but I'm stuck at the error ImportError: No module named 'pip.utils.setuptools_build'. There is an answer to this problem in stackoverflow which seems to solve the problem for others, but it doesn't work for me.
Here’s a summary of what I’ve done and tried so far:
Installed Python 3.5 and set up the Windows path environment so
that it works from any directory.
Installed pip for Python.
Tried to install the package with python -m pip install webrtcvad,
but it failed, returning the error Unable to find vcvarsall.bat.
I found a blog that deals with the vcvarsall.bat
problem: blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcvarsall-bat. Following the directions of that blog:
First I just installed Visual C++ Build Tools 2015 and tried installing the package straight away (without updating setuptools), but I received a lot of error messages (which I didn’t write down).
I tried reinstalling setuptools, which I did following the directions in https://pypi.python.org/pypi/setuptools: I removed the version of setuptools that came with my Python installation (v20), and installed the latest version (v30). This time I got a different error message when trying to install py-webrtcvad: ImportError: No module named 'pip.utils.setuptools_build'.
Asked for assistance in the Python official chat. They made three
suggestions:
Updating pip with python -m pip install --upgrade pip. Didn’t
work. Again, the error ImportError: No module named 'pip.utils.setuptools_build'.
Reinstalling Visual C++ Build Tools 2015. No difference, same error
again.
Reinstalling Python itself. The Python installer offers three
choices: Repair, modify and uninstall.
Repair: Didn’t work. Same error.
Modify: Doesn’t look like it offers useful modifications for this.
Uninstall: Uninstalled and reinstalled. Still the same error.
I’m out of ideas. Can you help me?
Note: I imagine this should be doable in Windows 7 with Python 3.5. However, if it isn't I'm open to trying anything different. For example, installing a different version of Python would be no problem at all. I could also try installing Linux if that will solve the problem.
There was a bug in version 2.0.8 of webrtcvad that caused it to use the wrong flags when compiling for Windows: it was using -DWEBRTC_POSIX instead of -DWIN32. This might have been the source of the "lot of error messages" you got during one of your early attempts.
The fixed version has been pushed to pypi as version 2.0.9. I've confirmed that pip install webrtcvad works correctly on Windows 10. I'm using a pretty fresh install of Python, so I would try it first without reinstalling setuptools.

Error when installing python

I was trying to install python and for some weird and unknown reason, the installation process is stopped and returns this error
An error occurred during the installation of assembly 'Microsoft.VC90.CRT,version="9.0.21022.8",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="amd64",type="win32"'. Please refer to Help and Support for more information.
This is the first time I encountered such error. I tried 'googling' it but there seems to be no way to fix this up. Do you guys have any suggestions? I just want to install python.
I know this is an old post but I recently ran into this exact same issue.
It was caused by my machine having pending Windows updates that needed a restart to be applied.
Once you've reset your machine remove the C:\Python27 folder (this is important).
Rerun the installer and it should work with no issues :-)
Please provide the environment you have installed.
if windows 2008 R2, because of the rights issue, you need to cancel the installation of pip, it is best not to install in C.
msiexec.exe /quiet /i python-2.7.10.amd64.msi ADDLOCAL=DefaultFeature TARGETDIR=D:\python27
I encountered the same problem. The reason is that Python-dependent system updates need to be rebooted before they can be configured correctly
Try Anaconda it has a lot of libraries already packaged in it. And it comes with conda : a package manager.
conda install my-package
And my-package is already installed.

Categories

Resources