0

I installed the python package lifelines on my terminal. The windows terminal is my terminal of choice, with a powershell and anaconda terminal that I often used.

I tried installing the package using the provided commands in the documentation:

pip install lifelines and conda install -c conda-forge lifelines

Both times the installation is marked as successfull. When I run Python within the terminal I can import the lifelines package without problem. However whem I import it on a jupyter notebook it yields a ModuleNotFoundError.

The base environment I use does not contain the lifelines package when I verify its contents using the Anaconda Navigator.

nid
  • 155
  • 3
  • 9

2 Answers2

0

The jupyter notebooks are run on Anaconda Powershell, and so are the environments and packages.

Installing on the Windows Powershell will never work. Running the conda install -c conda-forge lifelines in the Anaconda shell solved the issue.

So silly, yet so time consuming it is worth sharing.

nid
  • 155
  • 3
  • 9
0

I had a issue like this, python3 -m pip install <package_name> solved it for me. Use python -m pip install <package_name> for Python2.

ilearnjava
  • 26
  • 2