You might need to update the env_name, conda_dir and arcgis_dir variables to the actual paths and names used on your machine (i.e., the set xyz=abc statements at the top of the bash files). "%arcgis_dir%\bin\Python\scripts\propy.bat" shapefile_upload.py URL Path_to_shapefile -U Username -P Password bat file to be as follows: set arcgis_dir=C:\Program Files\ArcGIS\Pro If you have ArcGIS Pro currently installed on your machineĪccording to this ArcGIS documentation, you need to refer to propy.bat instead of python.exe. Anaconda Individual Edition 2021.11 includes a new release of Anaconda Navigator version 2.1.1. %env_dir%\python.exe shapefile_upload.py URL Path_to_shapefile -U Username -P Password bat file to look like this: onĬall %conda_dir%\Scripts\activate.bat %env_dir% If you installed the arcgis library through conda but do not have ArcGIS Pro installed on yout machine, you need to call the activate.bat file from the main conda folder and point it to your newly created environment.Įdit your. If you do not have ArcGIS Pro currently installed on your machine bat script for the environment to be set properly? By data scientists, for data scientists ANACONDA About Us Anaconda Nucleus Download Anaconda ANACONDA. bat file when run from the basic windows cmd window, even though I'm calling the Python interpreter within the correct environment. Anaconda Navigator is a desktop graphical user interface included in Anaconda that allows you to launch applications and easily manage conda packages, environments and channels without the need to use command line commands. I think the Python environment is not used properly by the. bat script, I get an error that it's unable to ArcGIS Online, and the shapefile is not uploaded. However, when I open a regular cmd window (not via Anaconda Navigator), and run the. We can launch Jupyter Notebook or Spyder to use Python commands. Anaconda Navigator will open as shown below There are many options available in this window. bat script, the shapefile is successfully uploaded to ArcGIS Online. How to run Python commands Using Anaconda Navigator Click at start Menu-> All Programs-> Anaconda3 (32 Bit) ->Anaconda Navigator. When I select "Open Terminal" in Anaconda Navigator for the ArcGIS_Test environment and execute this. bat file looks like this: call "c:\ProgramData\Anaconda3\envs\ArcGIS_Test\python.exe" shapefile_upload.py URL Path_to_shapefile -U Username -P Password It takes several arguments (ArcGIS Online URL, path to shapefile, username, and password). The Python script uploads a shapefile to ArcGIS Online. I installed the ArcGIS libraries by following exactly these instructions. I'm trying to run a Python script (shapefile_upload.py) which uses ArcGIS libraries. Anaconda Navigator is a desktop graphical user interface included in Anaconda that allows you to launch applications and easily manage conda packages.
0 Comments
Leave a Reply. |