Skip to content

Commit 39f6a77

Browse files
authored
Merge pull request #246 from DavidJVitale/dev_site_current
thanks @DavidJVitale
2 parents 8902f6b + f8f7375 commit 39f6a77

File tree

2 files changed

+42
-10
lines changed

2 files changed

+42
-10
lines changed

guide/01-getting-started/install-and-set-up.ipynb

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
" - [Install Using ArcGIS Pro Python Package Manager](#Install-using-ArcGIS-Pro-Python-Package-Manager)\n",
2121
" - [Install Using the Python Command Prompt](#Install-using-Python-Command-Prompt)\n",
2222
" - [Install Using Anaconda for Python Distribution](#Install-using-Anaconda-for-Python-Distribution)\n",
23-
" - [Install Using pip](#Install-using-pip)\n",
23+
" - [Install Using pip or pipenv](#Install-using-pipenv-or-pip)\n",
2424
" - [Install without Dependencies](#Install-without-Dependencies)\n",
2525
" - [Upgrade the `arcgis` package](#Upgrade-the-arcgis-package)\n",
2626
" - [ArcGIS Pro 2.1](#ArcGIS-Pro-2.1)\n",
@@ -118,17 +118,33 @@
118118
"\n",
119119
"To use the API in different IDEs, proceed to **[Using the API](#Using-the-API)**\n",
120120
"\n",
121-
"### Install using pip\n",
121+
"### Install using pipenv or pip\n",
122122
"\n",
123-
"[Pip](https://pip.pypa.io/en/stable/) is a package management system used to install and manage software packages written in Python, similar to conda. Many pip packages can be found in the [Python Package Index (PyPI)](https://pypi.python.org/pypi), including the ArcGIS API for Python pip package. To install the API with pip, open a terminal and enter the following command:\n",
123+
"#### Pipenv\n",
124+
"[Pipenv](https://docs.pipenv.org/) is the official packaging tool for managing environments and installing packages from the [Python Package Index (PyPI)](https://pypi.python.org/pypi). To install the ArcGIS API for Python from PyPI in a new environment, create a new folder named `your-folder`. Open a terminal, and run `cd /path/to/your-folder` to change directories into `your-folder`. Then, enter the following command to simultaneously create a new environment and install the API in it:\n",
125+
"\n",
126+
"```\n",
127+
"pipenv install arcgis\n",
128+
"```\n",
129+
"\n",
130+
"After running this command, you will notice that a new file named `Pipfile` was created in `your-folder`. A [Pipfile](https://github.com/pypa/pipfile) contains package information that represents a python environment. Open your terminal and make sure you are still in the `your-folder` directory; then, run `pipenv shell`. You have now activated your python environment, the environment that contains the `arcgis` package! You can run `jupyter notebook` or `python` in this environment to start using the API.\n",
124131
" \n",
125-
"```python\n",
132+
"Pipenv differs from conda and other environment managers in that environments are specific to the folder that contains the Pipfile. In this way, pipenv's use of `Pipfile` is similar to how `npm` uses `package.json`. To learn more about installing and using pipenv, click [here](https://docs.pipenv.org/) or [here](http://docs.python-guide.org/en/latest/dev/virtualenvs/#installing-packages-for-your-project).\n",
133+
"\n",
134+
"> __Tip__: You can run any command in an environment without activating it by running `pipenv run {insert_command_here}` in a directory with a valid Pipfile.\n",
135+
"\n",
136+
"#### Pip\n",
137+
"\n",
138+
"[Pip](https://pip.pypa.io/en/stable/) is the predecessor of pipenv, and can also be used to install packages from PyPI (but you must manage environments with seperate tools like [virtualenv](https://virtualenv.pypa.io/en/stable/)). To install the API with pip, open a terminal and enter the following command:\n",
139+
" \n",
140+
"```\n",
126141
"pip install arcgis\n",
127142
"```\n",
128143
"\n",
129-
"Pip and conda are totally seperate package managers, and should avoid being used interchangeably. It is recommended you use conda to install the API if you are a beginner user. [Read more about the differences](https://stackoverflow.com/questions/20994716/what-is-the-difference-between-pip-and-conda).\n",
144+
"#### Disclaimer\n",
145+
"You should avoid mixing conda with pipenv/pip: they are completely seperate package managers. It is recommended that you use conda to install the API if you are a beginner user. Read more about the differences [here](https://stackoverflow.com/questions/20994716/what-is-the-difference-between-pip-and-conda) and [here](http://docs.python-guide.org/en/latest/dev/virtualenvs/).\n",
130146
"\n",
131-
"> Note: when installing the ArcGIS API for Python with pip, some dependencies may require Microsoft Visual C++ 14.0. If you see any errors related to this, either install the Microsoft Visual C++ tools or install the API without dependencies.\n",
147+
"> __Note__: when installing the ArcGIS API for Python with pipenv/pip, some dependencies may require Microsoft Visual C++ 14.0. If you see any errors related to this, either install the Microsoft Visual C++ tools or install the API without dependencies.\n",
132148
"\n",
133149
"### Install without Dependencies\n",
134150
"\n",
@@ -280,7 +296,7 @@
280296
"name": "python",
281297
"nbconvert_exporter": "python",
282298
"pygments_lexer": "ipython3",
283-
"version": "3.6.1"
299+
"version": "3.6.5"
284300
},
285301
"varInspector": {
286302
"cols": {

guide/01-getting-started/system-requirements.ipynb

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"## Dependencies\n",
1616
"The full power of the ArcGIS API for Python is best experienced when all its dependencies are installed. However, specific tasks such as GIS administration and content management can be accomplished with just the [`six`](https://pypi.python.org/pypi/six) package installed. See [Install without Dependencies](../install-and-set-up/#Install-without-Dependencies) to install the `arcgis` package in this manner.\n",
1717
"\n",
18-
"It is recommended to install the `arcgis` package the default way of either `conda install -c esri arcgis` or `pip install arcgis`. When installed in this manner, all the below dependencies are automatically installed. (Note that most of these packages have dependencies of their own.)\n",
18+
"It is recommended to install the `arcgis` package the default way of either `conda install -c esri arcgis` or `pipenv install arcgis`. When installed in this manner, all the below dependencies are automatically installed. Note that most of these packages have dependencies of their own.\n",
1919
"\n",
2020
"* [six](https://pypi.python.org/pypi/six)\n",
2121
"* [pandas](https://pandas.pydata.org/)\n",
@@ -28,8 +28,24 @@
2828
"* [keyring](https://pypi.python.org/pypi/keyring/10.6.0)\n",
2929
"* [winkerberos](https://pypi.python.org/pypi/winkerberos/0.7.0) (Windows only)\n",
3030
"\n",
31-
"> Note: if `arcpy` is found in the current python environment, it may be used in various locations. Otherwise, `pyshp` will be used. See [SpatialDataFrame](https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html?highlight=spatialdataframe#spatialdataframe) for more information."
31+
"> Note: if `arcpy` is found in the current python environment, it may be used in various locations. Otherwise, `pyshp` will be used. See [SpatialDataFrame](https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html?highlight=spatialdataframe#spatialdataframe) for more information.\n",
32+
"\n",
33+
"### Optional Dependencies\n",
34+
"\n",
35+
"There are some other python packages that may be required to use certain functionality in the API, but are __not__ automatically installed. To use that functionality, you must manually call `conda install {package_name}` or `pipenv install {package_name}` for the below packages:\n",
36+
"\n",
37+
"* [beautifulsoup](https://www.crummy.com/software/BeautifulSoup/) - used when authenticating with OAuth2.\n",
38+
"* [dill](https://pypi.org/project/dill/#description) - used when creating a Python toolbox from a method."
3239
]
40+
},
41+
{
42+
"cell_type": "code",
43+
"execution_count": null,
44+
"metadata": {
45+
"collapsed": true
46+
},
47+
"outputs": [],
48+
"source": []
3349
}
3450
],
3551
"metadata": {
@@ -48,7 +64,7 @@
4864
"name": "python",
4965
"nbconvert_exporter": "python",
5066
"pygments_lexer": "ipython3",
51-
"version": "3.6.1"
67+
"version": "3.6.5"
5268
}
5369
},
5470
"nbformat": 4,

0 commit comments

Comments
 (0)