Check whether package X is installed
Method 1: In the shell
# go into the environment
# hq @ Hanqings-iMac in ~ [19:58:58]
$ conda activate genome_book
(genome_book)
# you should see you are using the python interpreter
# from your environment directory
# hq @ Hanqings-iMac in ~ [19:59:14]
$ which python
/Users/hq/miniconda3/envs/genome_book/bin/python
(genome_book)
# Now start the python interpreter
# hq @ Hanqings-iMac in ~ [19:59:21]
$ python
Python 3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 22:45:16)
[Clang 9.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd # import package X, pd is just a temporary alias for pandas, you can name it whatever you want
>>> pd.__version__ # the above command already confirmed pandas is installed. But this command tell you the exact version
'1.0.3'Method 2: In Jupyter Notebook
Last updated