Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. import pandas as pd
  2. #body of code
  3. writer = pd.ExcelWriter(filename, engine='xlsxwriter')
  4.  
  5. #Import Packages
  6. import pandas as pd
  7. from sklearn import linear_model
  8.  
  9. #Create an Array of the Package names
  10. imports = ['pandas','sklearn']
  11.  
  12. #find installed package version on local machine for each imported package
  13. import pip #needed to use the pip functions
  14. for i in pip.get_installed_distributions(local_only=True):
  15. for ii in imports:
  16. if str(i).find(str(ii)) != -1:
  17. print(str(i))
  18.  
  19. #pandas 0.18.1 is found but scikit-learn 0.17.1 is not
  20.  
  21. print(list(item[1] for item in pkgutil.iter_modules()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement