Import pandas is not working in Jupyter Notebook - python

I tried
pip install pandas on terminal
!pip install pandas on Jupyter Notebook
Creating new environment in anaconda then installing pandas again
conda install pandas nothing seems to work here

Try:
pip install --upgrade pip
pip install jupyter
then in jupyter notebook:
!pip install pandas

try installing the ipykernel:
conda isntall ipykernel
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"

Related

SageMath can't find jupyterthemes

I am running SageMath in MacOS with the built-in Jupyter notebook.
I have tried the following installation
(1) in terminal
sage -pip install jupyterthemes
(2) inside the jupyter notebook
!pip install jupyterthemes
!pip3 install jupyterthemes
!python3 -m pip install jupyterthemes
But in any case, running !jt in the notebook always returns
zsh:1: command not found: jt
I wonder how to make it work?

Error when importing cv2 on anaconda prompt but it is working on jupyter notebook

I am importing libraries that I installed using pip install to Jupyter Notebook using the anaconda distribution, which is working. Next, I am trying to import the same libraries in the anaconda command prompt and running it. I am getting this error message:
ModuleNotFoundError: No module named 'cv2'
try these things:
First check if you are able to see your library by this command:
$ pip list or conda list
if not available install this module:
$ pip install opencv-python or conda install opencv-python
But before that, try to check numpy module is available or not. If numpy is not available, then install this first.
$ pip install numpy
If all of them exist then, Uninstall opencv-python and numpy first and upgrade your pip using the below command.
$ pip install --upgrade pip
Two options to install cv2 with the latest conda & python3:
Open the Anaconda Prompt and switch to your environment:
$ conda activate myenv
Then install opencv from the menpo channel:
$ conda install -c menpo opencv
Open the Anaconda Prompt with admin permission and make sure you're in the base environment:
$ conda activate base
Then install opencv from the menpo channel:
$ conda install -c menpo opencv
Reconnect your notebook to the kernel to import cv2.

ModuleNotFoundError: No module named 'snorkel.labeling'

I installed snorkel using conda and when I try to run - from snorkel.labeling import labeling_function it throws the following error - ModuleNotFoundError: No module named 'snorkel.labeling'.
I tried looking up for a solution on Github, but unfortunately, I couldn't follow through. I have also tried installing nb_conda_kernels, to make all your conda environments available in jupyterbut it didn't help. Also tried creating a separate env, installing snorkel and launching jupyter notebook from the snorkel's environment, and it didn't work either. Any form of help is much appreciated!
Thanks in advance!
Try these install instructions:
conda create --yes -n snorkel
conda activate snorkel
conda install pytorch==1.1.0 -c pytorch
conda install snorkel==0.9.0 -c conda-forge
Or these, listed here:
# [OPTIONAL] Activate a virtual environment
conda create --yes -n spam python=3.6
conda activate spam
# Install requirements (both shared and tutorial-specific)
pip install environment_kernels
# We specify PyTorch here to ensure compatibility, but it may not be necessary.
conda install pytorch==1.1.0 -c pytorch
conda install snorkel==0.9.5 -c conda-forge
pip install -r spam/requirements.txt
# Launch the Jupyter notebook interface
jupyter notebook spam
Please try the following:
For pip users
pip install snorkel
For conda users
conda install snorkel -c conda-forge

dlib installation on jupyter(Anaconda 3)

Can anyone tell that how much time it will take to install the 'dlib' library in jupyter.
I am trying from 2 days but its not installing.
Thanks.
I have used following command to install dlib in jupyter:
pip install dlib
Open powershell in anaconda. Create an environment using
conda create -n envname
and activate the environment via
conda activate envname
Then try this:
conda install -c conda-forge dlib

No module named 'pmdarima'

Im using the jupyter notebook from remote access and want to import the pmdarima for the auto_arima to select the arima model. How can I install the pmdarima through remote access ?
import auto_arima package
from pmdarima import auto_arima
The result:
ModuleNotFoundError: No module named 'pmdarima'
you can do !pip install pmdarima in a jupyter cell and it should install the package in where ever the jupyter server is running and the python installed in it.
Assuming that you are using Conda, access the prompt for the environment that you are working with and install the module pmdarima by running
conda install -c saravji pmdarima
(Source)
Alternatively one might use pip (pmdarima pypi)
pip install pmdarima
Open up the Anaconda Command prompt and run pip3 install pmdarima
Worked like a charm for me.
First of all check your internet connection. Then try the following in your jupyter:
pip install pmdarima
Then reboot.
in Jupyternotebook
!pip install pmdarima
for conda environments
conda install -c saravji pmdarima
from command line in windows
pip install pmdarima

Categories

Resources