Package: pip2df
Parses all imports and the imports of the imports of a py file into a Pandas DataFrame using pipdeptree/pipreqs/pippip install pip2dfTested against Windows 10 / Python 3.10 / Anaconda# The Python file you want to get the imports from# "C:\ProgramData\anaconda3\envs\adda\stra6.py" in this casefromwin10ctypestoastimportshow_toastshow_toast(title="Title",message="Message",icon=r"C:\Users\hansc\Pictures\numberresults.png",duration=1,repeat=2,pause=2,threaded=False,)# Create a new file (Console works as well) and use this code:# The first time you use this module, you have to parse all modules in the envfrompip2dfimportImportFetchercf=(# Parsing 150 packages takes around 5 minutes.ImportFetcher().get_all_modules_in_env(ignore_packages=("ipython","pip","zipp","docutils","black","pipreqs","readme-renderer","rich","twine","keyring","importlib-metadata",)).save_all_modules_dataframe("f:\\saveallimports.pkl")# Since you are probably not installing every day a new package, you can save the parsing results and load them later on)cf.load_all_modules_dataframe('f:\\saveallimports.pkl')# Save the parsing resultsprint(cf.df)# Shows all modules in the envfileimports=cf.get_imports_from_py_file(r"C:\ProgramData\anaconda3\envs\adda\stra6.py")print(fileimports.to_string())# Outputpackage_namedepsfoldersVersionSummaryHome-pageAuthorAuthor-emailLicenseLocationRequiresRequired-bypipreqsimport_level116win10ctypestoast((Pillow,None),(pystray,None))C:\ProgramData\anaconda3\envs\adda\lib\site-packages\win10ctypestoast0.10Windows-10-Toast-Notificationswithoutpywin32dependencyhttps://github.com/hansalemaos/win10ctypestoastJohannesFischer<aulasparticularesdealemaosp@gmail.com>MITc:\programdata\anaconda3\envs\adda\lib\site-packagesPillow,pystray((Pillow,>=9.5.0),(pystray,>=0.19.4))076Pillow()C:\ProgramData\anaconda3\envs\adda\lib\site-packages\PIL9.4.0PythonImagingLibrary(Fork)https://python-pillow.orgAlexClark(PILForkAuthor)aclark@python-pillow.orgHPNDc:\programdata\anaconda3\envs\adda\lib\site-packagesconvpic2ico,pystray,win10ctypestoast((cffi,>=1.15.1),(defusedxml,>=0.7.1),(ipython,>=8.12.0),(numpy,>=1.24.2),(olefile,>=0.46),(packaging,>=23.0),(PyQt5,>=5.15.9),(PyQt6,>=6.4.2),(PySide2,>=5.15.2.1),(PySide6,>=6.5.0))188pystray((Pillow,None),(six,None))C:\ProgramData\anaconda3\envs\adda\lib\site-packages\pystray0.19.4Providessystrayintegrationhttps://github.com/moses-palmer/pystrayMosesPalmérmoses.palmer@gmail.comLGPLv3c:\programdata\anaconda3\envs\adda\lib\site-packagesPillow,sixwin10ctypestoast((AppKit,>=0.2.8),(Foundation,>=0.1.0a0.dev1),(Pillow,>=9.5.0),(six,>=1.16.0),(Xlib,>=0.21))166numpy()C:\ProgramData\anaconda3\envs\adda\lib\site-packages\numpy1.24.2FundamentalpackageforarraycomputinginPythonhttps://www.numpy.orgTravisE.Oliphantetal.BSD-3-Clausec:\programdata\anaconda3\envs\adda\lib\site-packagesa-cv-imwrite-imread-plus,a-pandas-ex-fastloc,a-pandas-ex-numexpr,a-pandas-ex-plode-tool,check-if-nan,group-and-iter-everything,locate-pixelcolor,npfastsortcpp,numexpr,opencv-python,pandas,pdmemedit,PrettyColorPrinter((charset_normalizer,>=3.1.0),(Cython,>=0.29.33),(genapi,>=0.0.8),(hypothesis,>=6.70.2),(mtrand,>=0.1),(mypy,>=1.1.1),(nose,>=1.3.7),(numarray,>=1.5.1),(Numeric,>=24.2),(pickle5,>=0.0.12),(psutil,>=5.9.4),(PyInstaller,>=5.9.0),(pytest,>=7.2.2),(pytz,>=2023.2),(scipy,>=1.10.1),(setuptools,>=65.6.3),(threadpoolctl,>=3.1.0),(typing_extensions,>=4.5.0))298six()<NA>1.16.0Python2and3compatibilityutilitieshttps://github.com/benjaminp/sixBenjaminPetersonbenjamin@python.orgMITc:\programdata\anaconda3\envs\adda\lib\site-packagesasttokens,bleach,pystray,python-dateutil<NA>214charset-normalizer()C:\ProgramData\anaconda3\envs\adda\lib\site-packages\charset_normalizer3.1.0TheRealFirstUniversalCharsetDetector.Open,modernandactivelymaintainedalternativetoChardet.https://github.com/Ousret/charset_normalizerAhmedTAHRIahmed.tahri@cloudnursery.devMITc:\programdata\anaconda3\envs\adda\lib\site-packagesrequests()321Cython()C:\ProgramData\anaconda3\envs\adda\lib\site-packages\Cython0.29.33TheCythoncompilerforwritingCextensionsforthePythonlanguage.http://cython.org/RobertBradshaw,StefanBehnel,DagSeljebotn,GregEwing,etal.cython-devel@python.orgApachec:\programdata\anaconda3\envs\adda\lib\site-packagesnpfastsortcpp((cElementTree,>=1.0.2-20050302),(coverage,>=7.2.2),(Cython,>=0.29.33),(elementtree,>=1.2.6-20050316),(ipython,>=8.12.0),(lxml,>=4.9.2),(Parser,>=0.1),(Pygments,>=2.14.0),(pythran,>=0.12.1),(runtests,>=0.0.28),(setuptools,>=65.6.3))383psutil()C:\ProgramData\anaconda3\envs\adda\lib\site-packages\psutil5.9.4Cross-platformlibforprocessandsystemmonitoringinPython.https://github.com/giampaolo/psutilGiampaoloRodolag.rodola@gmail.comBSD-3-Clausec:\programdata\anaconda3\envs\adda\lib\site-packagespdmemedit,subprocess-print-and-capture((concurrencytest,>=0.1.2),(mock,>=5.0.1),(pip,>=23.0.1),(wheel,>=0.38.4),(wmi,>=1.5.1))390pytz()C:\ProgramData\anaconda3\envs\adda\lib\site-packages\pytz2023.2Worldtimezonedefinitions,modernandhistoricalhttp://pythonhosted.org/pytzStuartBishopstuart@stuartbishop.netMITc:\programdata\anaconda3\envs\adda\lib\site-packagespandas((sets,>=0.3.2),(setuptools,>=65.6.3))396setuptools()C:\ProgramData\anaconda3\envs\adda\lib\site-packages\setuptools65.6.3Easilydownload,build,install,upgrade,anduninstallPythonpackageshttps://github.com/pypa/setuptoolsPythonPackagingAuthoritydistutils-sig@python.orgc:\programdata\anaconda3\envs\adda\lib\site-packagesnpfastsortcpp((Cython,>=0.29.33),(dl,>=0.1.0),(docutils,>=0.19),(Jinja2,>=3.1.2),(numpy,>=1.24.2),(railroad,>=0.5.0),(setuptools,>=65.6.3),(trove_classifiers,>=2023.3.9))386Pygments()C:\ProgramData\anaconda3\envs\adda\lib\site-packages\pygments2.14.0PygmentsisasyntaxhighlightingpackagewritteninPython.https://pygments.org/GeorgBrandlgeorg@python.orgBSD-2-Clausec:\programdata\anaconda3\envs\adda\lib\site-packagesipython,readme-renderer,rich((chardet,>=5.1.0),(colorama,>=0.4.6),(docutils,>=0.19),(importlib_metadata,>=6.1.0),(Pillow,>=9.5.0),(setuptools,>=65.6.3),(Sphinx,>=6.1.3))4115wheel()C:\ProgramData\anaconda3\envs\adda\lib\site-packages\wheel0.38.4Abuilt-packageformatforPythonhttps://github.com/pypa/wheelDanielHolthdholth@fastmail.fmMITc:\programdata\anaconda3\envs\adda\lib\site-packages((setuptools,>=65.6.3),)416colorama()C:\ProgramData\anaconda3\envs\adda\lib\site-packages\colorama0.4.6Cross-platformcoloredterminaltext.JonathanHartley<tartley@tartley.com>c:\programdata\anaconda3\envs\adda\lib\site-packagesclick,ipython((contextlib2,>=21.6.0),(mock,>=5.0.1))5