Reputation: 1
I have a Mac Book and I've been struggling to install imblearn. I tried running "conda install -c conda-forge imbalanced-learn" in the anaconda terminal but whenever I run my functions in my Jupyter notebook I get an error as if I never installed the package. This has happened with other packages before and I never figured out why this happens. Is there a different way of doing this with Macs?
Upvotes: 0
Views: 1114
Reputation: 3993
I suggest you use virtual environment
to isolate packages and avoid conflict. Then you can add a virtual environment to your jupyter notebook. Here's how:
Create a virtual env:
python3 -m venv your_env_name
Activate environment:
source your_evn_name/bin/activate
Install environment packages e.g.:
pip install -U imbalanced-learn
Install ipykernel:
pip install ipykernel
In the active environment, Install the new kernel
ipython kernel install --user --name=your_kernel_name
Then lunch jupyter notebook
jupyter notebook
Within notebooks, select the kernel you created (ie. your_kernel_name
) to start a new notebook with your environment settings.
Upvotes: 0