Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Cannot uninstall 'wrapt'. during upgrade #30191

Closed
Elmit2015 opened this issue Jun 27, 2019 · 63 comments
Closed

ERROR: Cannot uninstall 'wrapt'. during upgrade #30191

Elmit2015 opened this issue Jun 27, 2019 · 63 comments

Comments

@Elmit2015
Copy link

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 19.04 on Sony notebook):
  • TensorFlow version:
python
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
/home/ronald/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
>>> print(tf.__version__)
2.0.0-alpha0

Describe the problem
I try to upgrade to beta1 with:
install tensorflow==2.0.0-beta1
at the end I get:

Installing collected packages: wrapt, tensorflow
  Found existing installation: wrapt 1.10.11
ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

How to fix it?

@Elmit2015
Copy link
Author

I fixed it by:

conda update --all
pip install --upgrade tensorflow==2.0.0-beta1

@ssusie
Copy link

ssusie commented Jul 19, 2019

It didn't work for me. Still getting that error.

Edit: Fixed it by installing tensorflow 1.14 first then updating it to version 2.0

@atoyissan
Copy link

it work for me. Thank you

I fixed it by:

conda update --all
pip install --upgrade tensorflow==2.0.0-beta1

It work for me. Thank you

@fabio11c
Copy link

Works for me, thanks!

@eric-0x72
Copy link

It didn't work for me. Still getting that error.

@chikum
Copy link

chikum commented Jul 21, 2019

I fixed it by:

conda update --all
pip install --upgrade tensorflow==2.0.0-beta1

It worked for me also.

@chikum
Copy link

chikum commented Jul 21, 2019

conda update --all
pip install tensorflow

@congee524
Copy link

It didn't work for me. Still getting that error.

try
conda update wrapt

@tahwaru
Copy link

tahwaru commented Jul 23, 2019

conda update --all
pip install tensorflow

this worked for me!!!!

PS: I got a reboot after the first line was done.
I have windows 10.

@NoSyu
Copy link

NoSyu commented Jul 24, 2019

Above solutions are not worked for me. So I remove the `wrapt' by conda operation.

conda remove wrapt

And, it worked.

pip install tensorflow

Env: Windows 10

@RealPolitiX
Copy link

it work for me. Thank you

I fixed it by:

conda update --all
pip install --upgrade tensorflow==2.0.0-beta1

It work for me. Thank you

agreed!

@JulianKlug
Copy link

None of the solutions worked for me.
I am always getting ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
and with conda remove wrapt I get RemoveError: 'setuptools' is a dependency of conda and cannot be removed from conda's operating environment.

env: Mac OS 10.14.5

@statikkkkk
Copy link

Above solutions are not worked for me. So I remove the `wrapt' by conda operation.

conda remove wrapt

And, it worked.

pip install tensorflow

Env: Windows 10

This worked for me.

@robertlugg
Copy link

Tensorflow seems to have trouble being friendly with other packages. The following worked for me, starting from a clean conda environment:

pip install --upgrade pip
pip install six>=1.12.0
pip install httplib2==0.12.0
pip uninstall -y setuptools
pip install setuptools>=41.0.0

pip install tensorflow==1.14.0
pip install tfx

pip install pylint

This sequence gets rid of wrapt as well as tensorboard warnings and google-apitools failures.

@YogeshGadade
Copy link

This worked for me. I am using Jupyter notebook (OD: Ubuntu 16.0) all the commands running from the notebook:

At the time of installing tensor flow I got following two errors. The errors and solutions are:
ERROR 1: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Solution: run following command
!conda remove wrapt --yes

ERROR 2: tensorboard 1.14.0 has requirement setuptools>=41.0.0
Solution: run following command to solve this error
!pip uninstall -y setuptools
!pip install setuptools>=41.0.0

Now install tensorflow:
!pip install tensorflow

@rickykim93
Copy link

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

@ghost
Copy link

ghost commented Jul 31, 2019

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

@houchengbin
Copy link

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

It works for me. Thanks.

@XiaoqianSun0104
Copy link

conda update --all
pip install tensorflow

It works for me. thank you.

It didn't work for me. Still getting that error.

try
conda update wrapt

It didn't work for me. Still getting that error.

try
conda update wrapt

It works for me. Thank you.

@arvinnick
Copy link

It didn't work for me. Still getting that error.

try
conda update wrapt

It worked for me. Thanks a lot.

@deepeshguru
Copy link

Above solutions are not worked for me. So I remove the `wrapt' by conda operation.

conda remove wrapt

And, it worked.

pip install tensorflow

Env: Windows 10

Thanks @NoSyu this work me

@Boyombo1
Copy link

Boyombo1 commented Aug 9, 2019

This worked for me
pip install wrapt --upgrade --ignore-installed
pip install tensorflow

@hridaydutta123
Copy link

This worked for me
pip install wrapt --upgrade --ignore-installed
pip install tensorflow

This worked for me too.

@scaler2017
Copy link

pip install wrapt --upgrade --ignore-installed
pip install tensorflow
This worked for me too,Thanks.

@PrasadSiri
Copy link

Worked like charm

@zung
Copy link

zung commented Aug 21, 2019

Above solutions are not worked for me. So I remove the `wrapt' by conda operation.

conda remove wrapt

And, it worked.

pip install tensorflow

Env: Windows 10

it works for me, thanks very much!

@bhabani-shankar
Copy link

I fixed it by:

conda update --all
pip install --upgrade tensorflow==2.0.0-beta1

I fixed it by:

conda update --all
pip install --upgrade tensorflow==2.0.0-beta1

Thanks..It worked for me.

@HaikunHuang
Copy link

I fixed it by:

conda update --all
pip install --upgrade tensorflow==2.0.0-beta1

works for me too!!!!

@gitvimalhub
Copy link

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

Thanks alot,
it works for me and able to installed TensorFlow and keras

@moloudshahbazi
Copy link

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

Works for me, thanks :)

@sumiting
Copy link

它对我有用。谢谢

我通过以下方式修复它:

conda update --all
pip install --upgrade tensorflow==2.0.0-beta1

它对我有用。谢谢
me too

@jliu1235
Copy link

I fixed it by:

conda update --all
pip install --upgrade tensorflow==2.0.0-beta1

This works for me, thanks!

@PurenBITeam
Copy link

I fixed it by:

conda update --all
pip install --upgrade tensorflow==2.0.0-beta1

worked...great..thanks

@lkfrota
Copy link

lkfrota commented Nov 4, 2019

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

This works for my Windows 8.1

However, I was asked to consider upgrade the pip.
And I did it first of all, using:
python -m pip install --upgrade pip

Thanks!

@Devinmathew
Copy link

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

This worked for me too in my mac,Thanks.

@Jingciii
Copy link

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

Thanks so much! This saved me.

@JuanYan
Copy link

JuanYan commented Nov 20, 2019

I fixed it by:

conda update --all
pip install --upgrade tensorflow==2.0.0-beta1

This worked for me

@zeineb12
Copy link

zeineb12 commented Dec 1, 2019

conda update --all
pip install tensorflow

This worked for me
Env: Mac OS 10.14.6

@eleprocha
Copy link

try conda from anaconda prompt or else it doesnt work

@mikeyEcology
Copy link

This worked for me on a mac OS 10.14. Running in the terminal.

pip install wrapt --upgrade --ignore-installed
pip install tensorflow --upgrade

@Jingciii
Copy link

Jingciii commented Dec 6, 2019

I also fixed it by simply running

conda update wrapt

I think this avoids other unwanted upgrades by conda

@KishaRenee
Copy link

This worked for me:
pip install wrapt --upgrade --ignore-installed
pip install tensorflow

@rickykim93 you are awesome... I love you...

That worked for me too. Fantastic !!!

@ajourney1
Copy link

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

this worked for me.
thanks a lot to the genius developers

@ArashAmani
Copy link

ArashAmani commented Jan 19, 2020

pip install wrapt --upgrade --ignore-installed
pip install tensorflow --upgrade

So Nice! this worked for me too on Ubunto :)

@InTalor
Copy link

InTalor commented Jan 29, 2020

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

This worked for me too ! Thank you very much!
My environment is windows 10

@XueqiYang
Copy link

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

this works for me, Linux64, python3.7, with pip20.0.2 under conda self-defined enviromnet

@jmeile
Copy link

jmeile commented Feb 4, 2020

From all the solutions named here. This one is the only one that worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

@nahidalam
Copy link

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

This worked in Mac

@yangyang945
Copy link

This worked for me:

pip install wrapt --upgrade --ignore-installed
pip install tensorflow

I tried this and the tensorflow was successfully installed, but I had error when tired to use it. Than I tried
pip install --upgrade tensorflow==2.0.0-beta1
and after this, it works well!

@Neowy
Copy link

Neowy commented Feb 21, 2020

conda uninstall wrapt
pip install tensorflow

@back-p
Copy link

back-p commented Feb 26, 2020

Thank you man, this worked for me!

@turinglife
Copy link

Worked for Ubuntu 16.04 x86_64

When I perform the command "pip install tensorflow-gpu==1.15", I encounter the error "Found existing installation: wrapt 1.10.11 ERROR: Cannot uninstall 'wrapt'".

my solution:

  1. perform "pip install wrapt --upgrade --ignore-installed", upgrade wrapt 1.10.11 to wrapt-1.12.0
  2. perform "pip install tensorflow-gpu==1.15"

if you cannot perform "pip install tensorflow-gpu==1.15" successfully. Maybe you firstly need to upgrade pip-18.1 to pip-20.0 using "python -m pip install --upgrade pip setuptools".

@hysunflower
Copy link

This worked for me. I am using Jupyter notebook (OD: Ubuntu 16.0) all the commands running from the notebook:

At the time of installing tensor flow I got following two errors. The errors and solutions are:
ERROR 1: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Solution: run following command
!conda remove wrapt --yes

ERROR 2: tensorboard 1.14.0 has requirement setuptools>=41.0.0
Solution: run following command to solve this error
!pip uninstall -y setuptools
!pip install setuptools>=41.0.0

Now install tensorflow:
!pip install tensorflow

It worked for me , thank you

@imoisharma
Copy link

It's worked for me as well. Really appreciated for providing such details. However, could you please provide more details regarding the problem? Why we are not able to uninstall "wrapt" without upgrading all the packages and libraries? @Elmit2015

@mihaimaruseac
Copy link
Collaborator

Locking conversation to prevent a stream of "it works"

@tensorflow tensorflow locked as resolved and limited conversation to collaborators Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests