简体   繁体   中英

Uninstall packages inside python

I uninstalled tensorflow with:

pip uninstall tensorflow

it was successful and when I run it again, I receive this message:

Skipping tensorflow as it is not installed.

The issue is that when I import tensorflow inside python via:

python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
2022-05-27 09:35:22.981575: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found
2022-05-27 09:35:22.981872: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
>>> tensorflow.__version__
'1.15.0'
>>>

Do there is tensorflow installed and I could not uninstall it. How can I uninstall it completely? I want to install tensorflow==1.14 instead of 1.15.

I can install tensorflow==1.14.0 via:

pip install tensorflow==1.14.0

but when I run python, it's using tensorflow==1.15 instead of 1.14.0

If you run "pip list", do you see TF listed still?

Are you running Python with your code in a VENV? Curious if TensorFlow could be installed in main Python yet removed from VENV (though I saw your response to comment above).

Maybe go into Python's site-packages dir and check if TF package folder exists. If on Windows, maybe Python is installed in your Users directory, this TF the same. It can definitely get confusing.

Other folks mentioned to uninstall using "...-{cpu|gpu}".

I found this SO discussion about similar issue that may help. Link

Please keep us updated on findings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM