Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- #body of code
- writer = pd.ExcelWriter(filename, engine='xlsxwriter')
- #Import Packages
- import pandas as pd
- from sklearn import linear_model
- #Create an Array of the Package names
- imports = ['pandas','sklearn']
- #find installed package version on local machine for each imported package
- import pip #needed to use the pip functions
- for i in pip.get_installed_distributions(local_only=True):
- for ii in imports:
- if str(i).find(str(ii)) != -1:
- print(str(i))
- #pandas 0.18.1 is found but scikit-learn 0.17.1 is not
- print(list(item[1] for item in pkgutil.iter_modules()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement