<jupyter_start><jupyter_text>* You can run `!conda list` to see all the packages installed in this environment* You can also see all the modules installed with `help(modules)` or search for a particular module, but this is very slow.* Try importing balsam<jupyter_code>#import balsam<jupyter_output><empty_output><jupyter_text>Since Balsam is not installed in the base environment, we need to install it.  Recap of the required steps:```!conda create -y --name $ENVNAME --clone base!source activate $ENVNAME; pip install --no-cache-dir balsam-flow!source activate $ENVNAME; python -m ipykernel install --user --name $ENVNAME``` First, we need to pick a name for the environment and the kernel.<jupyter_code>%%time
!conda env list
!jupyter kernelspec list
ENVNAME="jhub_demo3"<jupyter_output><empty_output><jupyter_text>Now create a new environment with a clone of the base environment<jupyter_code>%%time
!conda create -y --name $ENVNAME --clone base<jupyter_output>Source:      /opt/anaconda3x
Destination: /home/keceli/.conda/envs/jhub_demo3
The following packages cannot be cloned out of the root environment:
 - defaults/linux-64::conda-4.8.1-py37_0
 - defaults/linux-64::conda-build-3.18.9-py37_3
 - defaults/linux-64::conda-env-2.6.0-1
Packages: 464
Files: 782
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate jhub_demo3
#
# To deactivate an active environment, use
#
#     $ conda deactivate

CPU times: user 2.16 s, sys: 453 ms, total: 2.61 s
Wall time: 2min 45s<jupyter_text>Balsam is only available as a PyPI package, so you can install it with `pip`<jupyter_code>%%time
!source activate $ENVNAME; pip install --no-cache-dir balsam-flow<jupyter_output>Collecting balsam-flow
[?25l  Downloading https://files.pythonhosted.org/packages/98/c5/55411522a8338adc676bb07353227aced5b4352a8e7e5be3277a3c72ea52/balsam_flow-0.3.8-py3-none-any.whl (93kB)
[K     |████████████████████████████████| 102kB 17.7MB/s ta 0:00:01
[?25hCollecting django>=2.1.1
[?25l  Downloading https://files.pythonhosted.org/packages/50/22/4c91847beceadbb54b5a518909ed5000bb1777168c7d6b087e8f79e5e05b/Django-3.1.2-py3-none-any.whl (7.8MB)
[K     |████████████████████████████████| 7.8MB 27.3MB/s eta 0:00:0127.3MB/s eta 0:00:01��███████████████     | 6.6MB 27.3MB/s eta 0:00:01
[?25hRequirement already satisfied: jinja2 in ./.conda/envs/jhub_demo3/lib/python3.7/site-packages (from balsam-flow) (2.10.3)
Requirement already satisfied: numpy in ./.conda/envs/jhub_demo3/lib/python3.7/site-packages (from balsam-flow) (1.17.4)
Requirement already satisfied: sphinx in ./.conda/envs/jhub_demo3/lib/python3.7/site-packages (from balsam-flow) (2.3.1)
Collecting psycopg2-binary
[?25l[...]<jupyter_text>Install Jupyter kernel<jupyter_code>%%time
!source activate $ENVNAME;python -m ipykernel install --user --name $ENVNAME<jupyter_output>/home/keceli/.conda/envs/jhub_demo3/lib/python3.7/site-packages/ipykernel/__main__.py:2: VisibleDeprecationWarning: zmq.eventloop.minitornado is deprecated in pyzmq 14.0 and will be removed.
    Install tornado itself to use zmq with the tornado IOLoop.
    
  from ipykernel import kernelapp as app
Installed kernelspec jhub_demo3 in /gpfs/mira-home/keceli/.local/share/jupyter/kernels/jhub_demo3
CPU times: user 42 ms, sys: 14.5 ms, total: 56.6 ms
Wall time: 4.14 s<jupyter_text>Final steps* Refresh the browser or open a new notebook* Select the new `Kernel` from the top dropdownlist  After selecting the new kernel, uncomment the following cell and execute<jupyter_code># import balsam
# print(balsam.__version__)
# print(balsam.__file__)
ENVNAME<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12963464140730718, 'fraction_numerical': 0.06359945872801083, 'mean_word_length': 5.1806020066889635, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '598399', 'license': 'MIT', 'n_tokens_mistral': 1535, 'n_tokens_neox': 1367, 'n_words': 348, 'path': 'webinar/install_kernel_demo.ipynb', 'repo_name': 'keceli/ezHPC', 'size': '3695'}