How to find if setuptools is installed in python

0 votes

Is there a way to find out if setuptools is installed in python? I am following a tutorial in which setuptools is mentioned as pre-requisites but I don’t know if I have installed it or no.

Jan 29, 2019 in Python by Gagana
1,907 views

1 answer to this question.

0 votes

You can use python interpreter to check it:

Enter python to get in the python interpreter

In python interpreter, run the following code:

>>> import sys
>>> 'setuptools' in sys.modules.keys()

This will return True if it is installed and False if it is not. 

answered Jan 29, 2019 by Omkar
• 69,230 points

Related Questions In Python

+1 vote
1 answer

How to check if a string is null in python

Try this: if cookie and not cookie.isspace(): # the ...READ MORE

answered Aug 20, 2018 in Python by Priyaj
• 58,090 points
22,817 views
0 votes
1 answer

How do I use urllib to see if a website is 404 or 200 in Python?

For Python 3, try doing this: import urllib.request, ...READ MORE

answered Nov 29, 2018 in Python by Nymeria
• 3,560 points

edited Dec 11, 2018 by Nymeria 13,694 views
0 votes
1 answer

How to check if a substring is present in a string using Python?

To check if the substring exists in ...READ MORE

answered May 9, 2019 in Python by Sharan
980 views
0 votes
1 answer

How to check if a list is empty in python?

To check if a list is empty ...READ MORE

answered May 27, 2019 in Python by Nisa
• 1,090 points
875 views
0 votes
1 answer

how do i change string to a list?

suppose you have a string with a ...READ MORE

answered May 21, 2019 in Python by Mohammad