# Cannot import a library after installing it

**URL:** <https://discourse.jupyter.org/t/cannot-import-a-library-after-installing-it/7977>\
**Category:** Notebook\
**Created:** [February 17, 2021, 6:56am UTC](https://discourse.jupyter.org/t/cannot-import-a-library-after-installing-it/7977 "2021-02-17T06:56:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinayak\_Nayak](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/vinayak_nayak/32/3753_2.png) [@Vinayak\_Nayak](https://discourse.jupyter.org/u/Vinayak_Nayak)\
**Post date:** [February 17, 2021, 6:56am UTC](https://discourse.jupyter.org/t/cannot-import-a-library-after-installing-it/7977/1 "2021-02-17T06:56:42Z")

</div>

**Describe the bug**  
I activated a virtual environment, opened notebook server there and installed a library in the notebook, refreshed/restarted the kernel yet cannot import the library well (pandas).

**Expected behavior**  
The library (pandas) should have been imported properly.

**Screenshots**

 ![sn](https://user-images.githubusercontent.com/45599762/108166922-e8937b80-711a-11eb-83ea-1673c93e32e6.png)

**Desktop (please complete the following information):**

- OS: Linux Ubuntu 18.04
- Browser: Google Chrome
- Version 87

---

<div class="post-metadata">

**Author:** ![1kastner](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/1kastner/32/1537_2.png) [@1kastner](https://discourse.jupyter.org/u/1kastner)\
**Post date:** [February 17, 2021, 9:19am UTC](https://discourse.jupyter.org/t/cannot-import-a-library-after-installing-it/7977/2 "2021-02-17T09:19:39Z")

</div>

Try `%pip install pandas` instead. Check [Installing Python Packages from a Jupyter Notebook | Pythonic Perambulations](https://jakevdp.github.io/blog/2017/12/05/installing-python-packages-from-jupyter/) for more information.
