pip install <some package> fails in Juypter notebooks

398
2
Jump to solution
03-20-2023 02:32 PM
DavidAnderson_1701
Occasional Contributor

I recently learned about the option to use pip install in a Jupyter notebook to temporarily install a package.  

When I try this in my install for ArcGIS Pro 3.0.3, it fails with the following message

pip install squarify

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

 

I'm assuming that pip is installed in C:\Program Files\ArcGIS\Pro\bin\Python with the space in Program Files causing the problem.

Using pip install in a stand alone Anaconda environment works with no problem.

 

0 Kudos
1 Solution

Accepted Solutions
David_McRitchie
Esri Contributor

Hey David, I believe you are correct. Can I just confirm if your ArcGIS Pro install is using the default Python environment or have you cloned this?

By default the default Python environment is installed under C:\Program Files\ArcGIS\Pro\bin\Python\envs, while cloned environments are stored under C:\Users\<USERNAME>\AppData\Local\ESRI\conda\envs.

Please also note that the Default environment is read-only so any installs should be done against a cloned environment.

Hope that helps,

David

 

Esri UK -Technical Support Analyst

View solution in original post

2 Replies
David_McRitchie
Esri Contributor

Hey David, I believe you are correct. Can I just confirm if your ArcGIS Pro install is using the default Python environment or have you cloned this?

By default the default Python environment is installed under C:\Program Files\ArcGIS\Pro\bin\Python\envs, while cloned environments are stored under C:\Users\<USERNAME>\AppData\Local\ESRI\conda\envs.

Please also note that the Default environment is read-only so any installs should be done against a cloned environment.

Hope that helps,

David

 

Esri UK -Technical Support Analyst
DavidAnderson_1701
Occasional Contributor

Correct.  This was done using the default Python environment.  I will create a clone environment for the workflow requiring the additional package.

 

Thanks for the help.

0 Kudos