Get a list of installed python packages

151
5
Jump to solution
12-16-2019 08:26 AM
Highlighted
MVP Esteemed Contributor

I'm going to bite the bullet perform the incremental upgrade from ArcGIS Pro 2.4.0 to 2.4.2.  In a python command window, I can run the pip list command and get the list and/or redirect that command to a file:

pip list

pip list > C:\temp\pip.txt

Is there a python command that I can run in a spyder console get the same result?  I haven't found anything in my google travels...

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
MVP Esteemed Contributor
(....) C:\...your install path...\bin\Python\envs\...your environment ...>conda list
# packages in environment at ...
#
alabaster 0.7.12 py_0
arcgis 1.7.0 py36_863 esri
arcgispro 2.5 0 esri
argh 0.26.2 py36_0
asn1crypto 1.2.0 py36_0
astroid 2.3.3 py36_0
atomicwrites 1.3.0 py36_1
attrs 19.1.0 py36_1
autopep8 1.4.4 py_0
babel 2.7.0 py_0
backcall 0.1.0 py36_0
bcrypt 3.1.7 py36he774522_0
blas 1.0 mkl
bleach 3.1.0 py_0
ca-certificates 2019.11.27 0
certifi 2019.11.28 py36_0
cffi 1.12.3 py36h7a1dbc1_0
cftime 1.0.0b1 py36h452e1ab_0
chardet 3.0.4 py36_1003
...huge snip

Then I do a big select all (right-click the top white margin, edit, select all)

then paste it into notepad++

You can also direct it to a file

conda env export > c:/temp/some.yaml

If you want to recreate an environment

View solution in original post

Reply
0 Kudos
5 Replies
Highlighted
MVP Esteemed Contributor
(....) C:\...your install path...\bin\Python\envs\...your environment ...>conda list
# packages in environment at ...
#
alabaster 0.7.12 py_0
arcgis 1.7.0 py36_863 esri
arcgispro 2.5 0 esri
argh 0.26.2 py36_0
asn1crypto 1.2.0 py36_0
astroid 2.3.3 py36_0
atomicwrites 1.3.0 py36_1
attrs 19.1.0 py36_1
autopep8 1.4.4 py_0
babel 2.7.0 py_0
backcall 0.1.0 py36_0
bcrypt 3.1.7 py36he774522_0
blas 1.0 mkl
bleach 3.1.0 py_0
ca-certificates 2019.11.27 0
certifi 2019.11.28 py36_0
cffi 1.12.3 py36h7a1dbc1_0
cftime 1.0.0b1 py36h452e1ab_0
chardet 3.0.4 py36_1003
...huge snip

Then I do a big select all (right-click the top white margin, edit, select all)

then paste it into notepad++

You can also direct it to a file

conda env export > c:/temp/some.yaml

If you want to recreate an environment

View solution in original post

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

PS  If you are using a conda environment, don't use pip unless you really really have to.  A great way to foul up an environment.  And remember you have an esri version and not a full Anaconda installation

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Yeah.  I'm just going through the shortcut mojo now. ...

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor
Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Thanks Dan!  I have those bookmarked from the last time!

Reply
0 Kudos