Hello everyone! I tried to do the following exercise but I can not because I can not import the arcpy package. What can I do? [Part Two]

479
3
09-20-2020 12:23 PM
yakovgrintz
New Contributor II
0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

So  .... import arcpy

fails?

If it fails, then you don't have it installed properly or are using a notebook that doesn't know where arcpy is.

Are you using arcgis pro's installation of jupyter notebooks? or a standalone jupyter notebook or jupyterab.


... sort of retired...
0 Kudos
yakovgrintz
New Contributor II

Thanks.
I do the exercise using a spyder. How do I teach him where the package is?

0 Kudos
DanPatterson
MVP Esteemed Contributor

If you installed spyder shortcuts should appear with the following properties.

If not, create a shortcut using the following parameters.

Target

C:\Install path\bin\Python\envs\arcgispro-py3\pythonw.exe "C:\arc_pro\bin\Python\envs\arcgispro-py3\Scripts\spyder-script.py"

Start in

C:\Install path\bin\Python\envs\arcgispro-py3\Scripts

Spyder and its kindred will be found in

C:\Install path\Python\envs\arcgispro-py3\Lib\site-packages

NOTE

\Install path\ is theis the install path for arcgis pro base environment

In you installed in a cloned environment this will need to be changed

....envs\arcgispro-py3\ .....  the last folder .... arcgispro-py3 ... would be your clone name


... sort of retired...
0 Kudos