0

I have two environments in my Anaconda Navigator. A base(root) environment and a python 3.5 environment called "NewZip35".

The base(root) environment has the following specifications:

     conda-build version : 3.21.4
     python version : 3.8.8.final.0
     virtual packages : __cuda=10.1=0
                      __win=0=0
                      __archspec=1=x86_64
     base environment : C:\ProgramData\Anaconda3  (writable)
     conda av data dir : C:\ProgramData\Anaconda3\etc\conda
     conda av metadata url : None
       channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                      https://repo.anaconda.com/pkgs/main/noarch
                      https://repo.anaconda.com/pkgs/free/win-64
                      https://repo.anaconda.com/pkgs/free/noarch
                      https://repo.anaconda.com/pkgs/r/win-64
                      https://repo.anaconda.com/pkgs/r/noarch
                      https://repo.anaconda.com/pkgs/msys2/win-64
                      https://repo.anaconda.com/pkgs/msys2/noarch
      package cache : C:\ProgramData\Anaconda3\pkgs
                      C:\Users\Username\.conda\pkgs
                      C:\Users\Username\AppData\Local\conda\conda\pkgs
      envs directories : C:\ProgramData\Anaconda3\envs
                      C:\Users\Username\.conda\envs
                      C:\Users\Username\AppData\Local\conda\conda\envs
           platform : win-64
         user-agent : conda/4.10.3 requests/2.25.1 CPython/3.8.8 Windows/10 Windows/10.0.19041
      administrator : True
         netrc file : None
       offline mode : False

While my python 3.5 environment named "NewZip35" has the following from conda info:

    (NewZip35) C:\Users\Username>conda info
    Current conda install:

           platform : win-64
      conda version : 4.3.30
   conda is private : False
  conda-env version : 4.3.30
conda-build version : 3.0.19
     python version : 3.5.6.final.0
   requests version : 2.14.2
   root environment : C:\ProgramData\Anaconda3\envs\NewZip35  (writable)
default environment : C:\ProgramData\Anaconda3\envs\NewZip35\envs\NewZip35
   envs directories : C:\ProgramData\Anaconda3\envs\NewZip35\envs
                      C:\Users\Username\AppData\Local\conda\conda\envs
                      C:\Users\Username\.conda\envs
      package cache : C:\ProgramData\Anaconda3\envs\NewZip35\pkgs
                      C:\Users\Username\AppData\Local\conda\conda\pkgs
       channel URLs : https://repo.continuum.io/pkgs/main/win-64
                      https://repo.continuum.io/pkgs/main/noarch
                      https://repo.continuum.io/pkgs/free/win-64
                      https://repo.continuum.io/pkgs/free/noarch
                      https://repo.continuum.io/pkgs/r/win-64
                      https://repo.continuum.io/pkgs/r/noarch
                      https://repo.continuum.io/pkgs/pro/win-64
                      https://repo.continuum.io/pkgs/pro/noarch
                      https://repo.continuum.io/pkgs/msys2/win-64
                      https://repo.continuum.io/pkgs/msys2/noarch
        config file : C:\Users\Username\.condarc
         netrc file : None
       offline mode : False
         user-agent : conda/4.3.30 requests/2.14.2 CPython/3.5.6 Windows/10 Windows/10.0.19041
      administrator : True

I'm trying to write code using Python 3.5 in my NewZip35 environment utilizing Zipline which has been successfully installed in the NewZip35 environment (python 3.5). When I click the triangle next to my base (root) environment in Anaconda Navigator/Environments and choose "Open With Jupyter Notebook", the base (root) environment opens in a web browser successfully in Jupyter Notebook. However, when I do the same for my NewZip35 environment (click the triangle and choose "Open With Jupyter Notebook"). I am unable to open the NewZip35 environment in Jupyter Notebook.

In the base (root) environment my library versions are as follows:

    conda: 4.10.3
    nb_conda: 2.2.1
    nb_conda_kernals: 2.3.1

In the NewZip35 environment my library versions are as follows:

    conda: 4.3.3.0
    nb_conda: 2.2.1
    nb_conda_kernals: 2.1.0

I tried adding ""allow_conda_downgrades: true"" to the below file (for some reason I have 4 condarc files):

"C:\ProgramData\Anaconda3\pkgs\conda-4.10.3-py38haa95532_0\info\test\tests\condarc"
"C:\ProgramData\Anaconda3\pkgs\conda-4.10.3-py38haa244fe_0\info\test\tests\condarc"
"C:\ProgramData\Anaconda3\pkgs\conda-4.10.1-py38haa95532_1\info\test\tests\condarc"
"C:\ProgramData\Anaconda3\pkgs\conda-4.5.11-py35_0\info\test\tests\condarc"

I tried to run the below code to update my nb_conda in my NewZip35 environment using the below:

conda config -allow_conda_downgrades true
conda install conda=4.6.11

And I received the following:

CondaEnvironmentNotFoundError: Could not find environment: 
C:\ProgramData\Anaconda3\envs\NewZip35\envs\NewZip35 .
You can list all discoverable environments with `conda info --envs`.

So I ran ""conda info --envs"" and received the following:

(NewZip35) C:\Users\Username>conda info --envs
# conda environments:
#
root                     C:\ProgramData\Anaconda3\envs\NewZip35

It states above that the NewZip35 environment is discoverable. So I am unable to open Jupyter Notebook from my python 3.5 environment (NewZip35), but I am able to open it from the base(root) environment. This issue has had me up for several nights, as it has completely delayed/stopped my project and I am unable to get past this issue. I have scoured the forums for a solution, and I have not found one. This issue has completely stopped my project and I'm unable to advance. I cannot figure out how to open the Jupyter Noteboook from my NewZip35 environment. Please help!


Update_1:

I ran the following:

activate NewZip35
pip install notebook

This is what I received:

(NewZip35) C:\Users\Username>pip install notebook
Requirement already satisfied: notebook in 
c:\programdata\anaconda3\envs\newzip35\lib\site-packages (5.0.0)
You are using pip version 10.0.1, however version 20.3.4 is available.
You should consider upgrading via 
the 'python -m pip install --upgrade pip' command.

So after that, I ran:

jupyter notebook

And this is what I received back:

(NewZip35) C:\Users\Username>jupyter notebook
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\NewZip35\Scripts
\jupyter-notebook-script.py", line 3, in <module>
import notebook.notebookapp
File "C:\ProgramData\Anaconda3\envs\NewZip35\lib\site-packages
\notebook\notebookapp.py", line 40, in <module>
ioloop.install()
File "C:\ProgramData\Anaconda3\envs\NewZip35\lib\
site-packages\zmq\eventloop\ioloop.py", line 210, in install
assert (not ioloop.IOLoop.initialized()) or \
AttributeError: type object 'IOLoop' has no attribute 'initialized'

Update_2:

I read through the forum in the link and the solution is to downgrade Tornado to 4.5.3. So I ran this in my NewZip35 environment:

conda install tornado=4.5.3

And I received this error again:

CondaEnvironmentNotFoundError: Could not find environment: 
C:\Users\Username\AppData\Local\conda\conda\envs\NewZip35 .
You can list all discoverable environments with `conda info --envs`.

So I ran:

conda info --envs

And received this back:

(NewZip35) C:\Users\Username>conda info --envs
# conda environments:
#
root                     C:\ProgramData\Anaconda3\envs\NewZip35

When I run ""conda info --env"" in my base(root) environment, I get this:

(base) C:\Users\Username>conda info --envs
# conda environments:
#
base                  *  C:\ProgramData\Anaconda3
NewZip35                 C:\ProgramData\Anaconda3\envs\NewZip35

It looks like when I try to install in the NewZip35 env, it can't find this location:

C:\Users\Username\AppData\Local\conda\conda\envs\NewZip35

I've confirmed that the above location does not exist. All I have in the conda\conda\ folder is this:

C:\Users\Username\AppData\Local\conda\conda\pkgs

So do I need to tell conda to install in this location? How do I do that? And then try to downgrade Tornado again, or maybe just try to install notebook in the below location?

C:\ProgramData\Anaconda3\envs\NewZip35
  • try to do this: open cmd, activate NewZip35 then `pip install notebook`, after that, type `jupyter notebook` – CuCaRot Aug 12 '21 at 05:26
  • Thank you, CuCaRot. I edited my question with Update_1, the results of your advice. Any suggestions? – UndergroundMan Aug 12 '21 at 06:49
  • I think this is [the solution](https://github.com/jupyter/notebook/issues/3407) – CuCaRot Aug 12 '21 at 06:55
  • Hi CuCaRot, i edited the question with Update_2 after reading through the forum you sent me. Any Suggestions? – UndergroundMan Aug 12 '21 at 16:30
  • Read through the answers in the marked duplicate. One only installs `jupyter` and `nb_conda_kernels` in a single environment; and `ipykernel` in kernel environments. Jupyter notebook is always launched from single environment and then kernels are selected through GUI interface. – merv Aug 12 '21 at 22:19

0 Answers0