Imcompatible packages when installing Tensorflow using pip - python

I try to install Tensorflow using this line in PowerShell (as admin):
pip install tensorflow
But received this ERROR:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
astroid 2.3.2 requires six==1.12, but you have six 1.15.0 which is incompatible.
astroid 2.3.2 requires wrapt==1.11.*, but you have wrapt 1.12.1 which is incompatible.
Also, I tried to uninstall six and wrapt using: pip uninstall six wrapt and run pip install tensorflow again but still got the same error as above.
Thank you in advance!

I was opening Anaconda Navigator so I closed it and reopened PowerShell again, ran the install command and it went smoothly without further error.

Related

pip ERROR: pip's dependency resolver does not currently take into account all the packages that are installed

I just installed a package using pip3 install maigret
i installed another thing using pip3 install but same error
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
crackmapexec 5.2.2 requires bs4<0.0.2,>=0.0.1, which is not installed.
crackmapexec 5.2.2 requires impacket<0.10.0,>=0.9.23, but you have impacket 0.10.0 which is incompatible.
crackmapexec 5.2.2 requires neo4j<5.0.0,>=4.1.1, but you have neo4j 1.7.0.dev0 which is incompatible.
crackmapexec 5.2.2 requires pylnk3<0.4.0,>=0.3.0, but you have pylnk3 0.4.2 which is incompatible.
You can try using following :-
pip install --use-feature=2020-resolver

Focal-loss pip installation screwed my conda env for supported GPU tensorflow installation

When I did pip install focal-loss <2022-04-20 Wed 10:00>
I got this:
Installing collected packages: tensorboard-data-server, tf-estimator-nightly, tensorflow-io-gcs-filesystem, tensorboard, libclang, keras, flatbuffers, tensorflow, focal-loss
Attempting uninstall: tensorboard
Found existing installation: tensorboard 2.2.2
Uninstalling tensorboard-2.2.2:
Successfully uninstalled tensorboard-2.2.2
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'D:\Ahmed\code\enviorment\conda_env_dir\tf220\Lib\site-packages\tensorflow\lite\experimental\microfrontend\python\ops\_audio_microfrontend_op.so'
Consider using the --user option or check the permissions.
Now pip list shows tensorboard 2.8
spyder 5.2.2
spyder-kernels 2.2.1
tensorboard 2.8.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.0
tensorflow-gpu 2.2.0
tensorflow-gpu-estimator 2.2.0
tensorflow-io-gcs-filesystem 0.24.0
after I run
pip install focal-loss --user*
I end up with unwantedly installed tensorflow 2.8:
Installing collected packages: tensorflow, focal-loss
WARNING: The scripts estimator_ckpt_converter.exe, import_pb_to_tensorboard.exe, saved_model_cli.exe, tensorboard.exe, tf_upgrade_v2.exe, tflite_convert.exe, toco.exe and toco_from_protos.exe are installed in 'C:\Users\ahmed\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed focal-loss-0.0.7 tensorflow-2.8.0
Now I got tensorflow-2.8.0 installed in my conda env originaly created for gpu supported tensorflow-2.2.0
I tried to remove it using
pip uninstall tensorflow-2.8.0*
Now I got
ModuleNotFoundError: No module named 'tf'
I restarted the conda session and my script craches on this error:
AttributeError: module 'tensorflow.python.util.dispatch' has no attribute 'add_fallback_dispatch_list'
As a last trial I tested the rollback to previous configuration of my conda env using
conda list --revisions command,
but I the proposed revisons were outdated and did not show much details about current and prvious pip packages installation that I hoped to get back to. So I choose the one befor the last. After running my script, my code still crashes into this error:
AttributeError: module 'tensorflow.python.util.dispatch' has no attribute 'add_fallback_dispatch_list' for which I did not find solution on the net.
I wander why for the focal-loss package the pip packages manager do not show prerequests and warnings about incompatible/compatible tensorflow versions and (y/n) options to accept/deny insatallation.
Is there pip command to rollback to previous configuration inside coonda env
There is some version mismatch problem among packages in your system. You can try again using:
!pip install --upgrade tensorflow-gpu # which will install latest tensorflow version in your environment.
and then install your required package (focal-loss) as below:
!pip install focal-loss # this will install latest focal-loss=0.0.7

Facing issue while installing rasa-x on windows using Anaconda

error i'm getting--
ERROR: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.
tensorflow 2.6.3 requires six~=1.15.0, but you'll have six 1.16.0 which is incompatible.
tensorflow 2.6.3 requires typing-extensions<3.11,>=3.7, but you'll have typing-extensions 4.0.1 which is incompatible.
rasa-sdk 2.8.4 requires typing-extensions<4.0.0,>=3.7.4, but you'll have typing-extensions 4.0.1 which is incompatible.
sanic-jwt 1.6.0 requires pyjwt==2.0.0, but you'll have pyjwt 2.3.0 which is incompatible.
rasa 2.8.23 requires aiohttp!=3.7.4.post0,<3.8,>=3.6, but you'll have aiohttp 3.8.1 which is incompatible.
rasa 2.8.23 requires apscheduler<3.8,>=3.6, but you'll have apscheduler 3.8.1 which is incompatible.
rasa 2.8.23 requires prompt-toolkit<3.0,>=2.0, but you'll have prompt-toolkit 3.0.27 which is incompatible.
rasa 2.8.23 requires sentry-sdk<1.3.0,>=0.17.0, but you'll have sentry-sdk 1.3.1 which is incompatible.
please look at image for more clarity of the error-
[1]: https://i.stack.imgur.com/Vdxo0.png
Version using for Installation--
conda create -n rasavirtualenv python=3.7.6
pip install --upgrade pip==21.3
pip install rasa-x --extra-index-url https://pypi.rasa.com/simple --use deprecated=legacy-resolver
Most probably this is caused because of pip's version. You should downgrade the pip version and see if that works. So make sure the virtual environment with rasa is active and:
pip install --upgrade pip==20.2, then run pip -V to make sure the right version is installed, lastly run pip install -U rasa-x --extra-index-url https://pypi.rasa.com/simple to install Rasa-x.

tensorflow 2.3.0 requires h5py<2.11.0,>=2.10.0, but you'll have h5py 3.1.0 which is incompatible

when I'm running
pip3 install face-compare
I got the below error, any suggestions
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
tensorflow 2.3.0 requires h5py<2.11.0,>=2.10.0, but you'll have h5py 3.1.0 which is incompatible.
pip uninstall h5py
pip install h5py==2.10.0

incompatible numpy and html5lib for tensorflow

tensorflow 1.7.0 has requirement numpy>=1.13.3, but you'll have numpy 1.11.0 which is incompatible.
tensorboard 1.7.0 has requirement html5lib==0.9999999, but you'll have html5lib 0.999 which is incompatible.
tensorboard 1.7.0 has requirement numpy>=1.12.0, but you'll have numpy 1.11.0 which is incompatible.
Please refer to this screenshot
Why are these messages showing up...even though I have the proper versions installed??I have upgraded and reinstalled them over and over. I also reinstalled pip and also tried easy install for pip. But the problem persists.
Could something be wrong with my OS installation? (Ubuntu 16.4)
These are some results I got by running
pip freeze
tensorboard==1.8.0
tensorflow==1.8.0
numpy==1.14.3
html5lib==0.9999999
httplib2==0.9.1
The error showing up because
installing lxml require installing numpy-1.11.0
tensorflow (already installed) require numpy>=1.13.3 (already installed)
To solve, you can:
downgrade tensorflow
try install a newer version of lxml.
Probably you need to uninstall and reinstall compatible version
pip uninstall tensorflow-tensorboard
And then reinstall
pip install tensorflow-tensorboard==<your_version>
Ex. I did
pip install tensorflow-tensorboard==1.5.1

Categories

Resources