Setting up Jupyter Notebook locally

I just setup Anaconda and Jupyter Notebook locally using the instructions in the tutorial but received the error “ImportError: DLL load failed while importing win32api: The specified module could not be found.”

After Googling, I could see it was a reasonably common problem on Windows 64 systems. After trying a few things that didn’t work, I ran “conda install pywin32” from the terminal and this worked for me.

I also clicked on the trust button to make sure Windows trusted the code.

This may help if you’re running on the same OS as myself.


Thanks for the tip. I can’t recall ever having that problem myself, but recently uninstalled Anaconda to a more “self-customised” version of what I need from Python.

One question though, did you install the 64- or 32-bit Anaconda distribution on your 64x system when this problem occurred?

It is better to add python-3 to your system’s path before installing Anaconda. Although, I’m not sure.

64bit Anaconda OS

I always choose 64 bit if available

Yes of course. Especially for data science which uses large chunks of RAM.

Mostly the 32bit Windows dll files doesn’t work on 64bit systems, but Anaconda has this all worked out. Strange problem you had there, but great solution for anyone else who faces the same problem

There is no need. As long as you have admin privileges Anaconda will add the paths for you during installation. Anaconda installs Python as well.

If it doesn’t for some reason, you can always add it afterwards. You need to have python installed before you can add it to the path anyways :rofl:

1 Like

There‘s a plugin for visual studio code for jupyter notebooks too.
Then you can run it in your VScode environment without anaconda.

I am trying to run the workbooks in Visual Studio Code. I think i installed all the components, but I get the following message when trying to run a box:
Data Science library ipykernel is not installed. Install?

i reply yes, but then get the following error:

PS C:\Users\MR\OneDrive - MyCompany, Inc\My Library\Python> conda activate base
conda : The term ‘conda’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • conda activate base
  •   + CategoryInfo          : ObjectNotFound: (conda:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

I think Conda is installed as it is my default interpreter:
the status bar says: Python 3.8.3 64-bit (‘base’: conda) with no errors or warnings
The current interpreter is: ~miniconda3\python.exe

What am I doing wrong here?

I tried to run conda in Powershell. I had to add the full path to the command. which suggests that I have a PATH configuration problem. where do i add the path?

PS C:\Users\MR> C:\Users\MR\miniconda3\Scripts\conda create -n zerotopandas -y python=3.8
Collecting package metadata (current_repodata.json): failed

Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.

Notice that I get an HTTP error. when i try the address directly I am able to open the page. what am i doing wrong?

You can try to follow the steps to find your real path.
As you mentioned, you’re using miniconda:
When you found the right path, you need to select exactly this interpreter in VScode on the upper right corner.
I hope this helps for you.

1 Like

Here’s also a brief description how to set the path environment variables in Windows manually:

this did not help, unfortunatley. i uninstalled everything and will have to try again

This is just one thing that worked for me.

Feel free to post more tips.

yes, this worked for me. I was able to get as far as creating an environment. I was even able to activate the environment in the Anaconda Prompt. Thank you very much
But when i tried to activate it in VS Code, I get this error:

PS C:\Users\MR> conda activate zerotopandas

CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate’.
If using ‘conda activate’ from a batch script, change your
invocation to ‘CALL conda.bat activate’.

To initialize your shell, run

  • $ conda init <SHELL_NAME>*

Currently supported shells are:

    • bash*
    • cmd.exe*
    • fish*
    • tcsh*
    • xonsh*
    • zsh*
    • powershell*

See ‘conda init --help’ for more information and options.

IMPORTANT: You may need to close and restart your shell after running ‘conda init’.

I tried to conda ini cmd.exe and conda init pwershell, closed the terminal window and reopened it, but I still get the error.

what am i doing wrong now? (there has got to be an easier way to set this all up)

I haven’t used VS Code with conda yet, but I found the following information:

conda environments cannot be automatically activated in the integrated terminal if PowerShell is set as the integrated shell.

There’s a video on Anaconda setup with VS Code here

How do I commit the files to my account when I run the code locally?
I tried doing it but it gave me an error

@na19b066 Remove the exclamation mark and then run pip install jovian

Installing anaconda is not mandatory for using jupyter notebooks.
One can install only jupyter without anaconda by writing pip install jupyter