imsoli.blogg.se

Install package in anaconda prompt
Install package in anaconda prompt













(r"C:\Program Files\ArcGIS\Pro\Resources\ArcPy") Os.environ = r"".format(os.environ, r"C:\Program Files\ArcGIS\Pro\bin") # if it is not amend those paths to point to where it really is e.g.

#INSTALL PACKAGE IN ANACONDA PROMPT PRO#

# these next two lines assume your Pro installation is in the default location

install package in anaconda prompt

Then type in python and in Python run the following commands: import bs4 In the Anaconda Prompt, activate the new environment with following command (you'll need to activate your environment every time you want to use it): activate AC36 ĥ) Let's now do a quick test to see if the new environment works as intended. Now copy these folders/files into the Lib\site-packages subfolder of the new AC36 environment, so to C:\Users\\Anaconda3\envs\AC36\Lib\site-packages.

install package in anaconda prompt

(If you are using a very old version of Pro, these may not be folders but rather files called arcgisscripting.pyd, arcpy_wmx.pyd, gapy.pyd.) at C:\Users\\AppData\Local\ESRI\conda\envs\arcgispro-py-clone\Lib\site-packages: Locate the following three folders in the Lib\site-packages folder of your current default ArcGIS Pro Python environment, e.g. To accomplish this, we need to make sure that our new Python environment can access the arcpy package from our ArcGIS Pro installation. In order to connect to this ArcGIS Online account, it is at the moment needed that we use the existing ArcGIS Pro connection rather than being able to use the Enterprise login. Ĥ) The following step is only needed because of the mentioned workaround to use the ESRI ArcGIS for Python API later in Section 3.10 in combination with the Penn State organizational accounts you created during the orientation week. Since ArcGIS Pro 2.7 is the first version of Pro that is based on Python 3.7 rather than 3.6, you will have to create a Python 3.7 Anaconda environment for this to work, while for all previous versions of Pro (= 2.7)" instead.Ĭreating the Anaconda Python environment (for ArcGIS Pro \Anaconda3\envs\AC36. The workaround requires that we connect our Anaconda Python environment with our ArcGIS Pro installation. Unfortunately we will have to use a little workaround to be able to use that API to access our Penn State enterprise accounts on ArcGIS Online. For reference, we also provide the conda commands used to create this environment at the end of this section.Īlso important to note is that one of the packages we will be working with in this lesson is the ESRI ArcGIS for Python API. yml file using conda in the command line interface ("Anaconda Prompt"). We create the new environment by importing this. yml file that lists all the packages we want in the environment with the exact version and build numbers we need. However, there are a lot of dependencies between the packages and it is relatively easy to run into some conflicts that are difficult to resolve. In principle, you could perform all the installations with a number of conda installation commands from the command line. We will use our Anaconda installation from Lesson 2 and create a fresh Python environment within it. We will take care of this task right away so that you then won't have to stop for installations when working through the lesson content.

install package in anaconda prompt

This lesson will require quite a few different Python packages.













Install package in anaconda prompt