Skip to content

Commit c8b0ee2

Browse files
committed
add more examples for package isntallation
1 parent 62b6c66 commit c8b0ee2

File tree

1 file changed

+31
-5
lines changed

1 file changed

+31
-5
lines changed

articles/hdinsight/spark/apache-spark-python-package-installation.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,38 @@ HDInsight cluster depends on the built-in Python environment, both Python 2.7 an
6969

7070
You can search the [package index](https://pypi.python.org/pypi) for the complete list of packages that are available. You can also get a list of available packages from other sources. For example, you can install packages made available through [conda-forge](https://conda-forge.org/feedstocks/).
7171

72-
- `seaborn` is the package name that you would like to install.
73-
- `-n py35new` specify the virtual environment name that just gets created. Make sure to change the name correspondingly based on your virtual environment creation.
72+
Use below command if you would like to isntall a library with its latest version:
73+
74+
- Use conda channel:
7475

75-
```bash
76-
sudo /usr/bin/anaconda/bin/conda install seaborn -n py35new --yes
77-
```
76+
- `seaborn` is the package name that you would like to install.
77+
- `-n py35new` specify the virtual environment name that just gets created. Make sure to change the name correspondingly based on your virtual environment creation.
78+
79+
```bash
80+
sudo /usr/bin/anaconda/bin/conda install seaborn -n py35new --yes
81+
```
82+
83+
- Or use PyPi repo, change `seaborn` and `py35new` correspondingly:
84+
```bash
85+
sudo /usr/bin/anaconda/env/py35new/bin/pip install seaborn
86+
```
87+
88+
Use below command if you would like to install a library with a specific version:
89+
90+
- Use conda channel:
91+
92+
- `numpy=1.16.1` is the package name and version that you would like to install.
93+
- `-n py35new` specify the virtual environment name that just gets created. Make sure to change the name correspondingly based on your virtual environment creation.
94+
95+
```bash
96+
sudo /usr/bin/anaconda/bin/conda install numpy=1.16.1 -n py35new --yes
97+
```
98+
99+
- Or use Pypi repo, change `numpy==1.16.1` and `py35new` correspondingly:
100+
101+
```bash
102+
sudo /usr/bin/anaconda/env/py35new/bin/pip install numpy==1.16.1
103+
```
78104

79105
if you don't know the virtual environment name, you can SSH to the head node of the cluster and run `/usr/bin/anaconda/bin/conda info -e` to show all virtual environments.
80106

0 commit comments

Comments
 (0)