0

My computer is a part of a large in-house network and installing packages is done by a different set of guys sitting behind a communication curtain. I had a TensorFlow-GPU version installed, but I guess it was not installed correctly, so I had raised a request to reinstall it correctly. It still does not work now, maybe because it was again reinstalled incorrectly or it might not have been touched at all.

How do I know when a package is installed in python?

Jalpa Panchal
  • 8,251
  • 1
  • 11
  • 26
mitra
  • 27
  • 8
  • I think you're asking *when* a package is installed, but I think you're really wanting to ask *if* a package is installed. The answer @TarunKolla refers to is a good answer to the question 'when was a package installed?', the answer given by 'enamoria' below is an answer to 'is a package installed?' or 'what version of a package is installed?' for that matter. – Grismar Sep 04 '19 at 05:29

2 Answers2

0

Your question is quite vague and it seems hard to me to really get it. But I will try :D

How do I know when a package is installed in python? pip show command would be enough. Try pip show tensorflow-gpu, and if tf is installed then it must be some output, otherwise pip will say tf-gpu is not installed.

For the reason of incorrectly installed, I think it might be due to many guys working on the same environment and mess up others install. My advice is taking a look at virtualenv, to create your own environment. You can find many detail tutorial of it on the net, I won't put it here

enamoria
  • 896
  • 2
  • 11
  • 29
0

You can issue pip show command which shows information about one or more installed packages.

pip show tensorflow-gpu

You should be able to see the output like this if tensorflow-gpu package is installed on your system:

Name: tensorflow-gpu
Version: 1.1.0
Summary: TensorFlow helps the tensors flow
Home-page: http://tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
Location: /usr/local/lib/python2.7/site-packages
Requires: wheel, numpy, mock, werkzeug, six, protobuf
Required-by: 
1218985
  • 7,531
  • 2
  • 25
  • 31