Python Forum
Cannot get to virtual environment in Jupyter IDE
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot get to virtual environment in Jupyter IDE
#1
I am trying to use fbprophet in jupyter notebook in a program for making predictions.

To use it requires python=3.61 which means that I must make a virtual environment
since my base environment uses python 3.8.

I make the virtual environment with no problem. I then active keras-env and that works.

This is all on the command line, new -terminal.

So far everything is fine, but I must make some additional changes or the when I go back to the jupyter notebook
IDE the changes will not be recognized. The IDE has to have these commands.

conda install ipkernel
python -m ipykernel install --user --name=kerasenv.

Now I assume these last two commands above must be run in an active keras-env environment. Nowhere does it say so, but I am just assuming that it must be true.

However, when I leave the command line and go back to the jupyter notebook IDE, it does now have keras-env in the upper right hand corner. So I am assuming I did it right.

I did not!

If I use the drop down down menu and select keras-env it does say that at the upper right hand corner.

However, when I go the first jupyter notebook IDE space and type in:

!python -V

and then execute that one command, I get python 3.85, not 3.61. As I said I want the version of 3.61 because when using keras that is the only python version that works with it a far as I know.

Everything seems, but I am still in the base environment, not the virtual environment.

What am I doing wrong? I believe that I am taking the right steps, but the result is that when in the jupyter notebook IDE, I am still using python 3.85 and not python 3.61. That means I never entered the virtual environment as far as the IDE is concerned. That is what I want to use the keras-env, not my base environment.

My base environment cannot run keras because it has python 3.85.

I have included a series of screenshots that go through the steps that I discussed above.

The only thing that I can think of as being wrong is that my jupyter notebook is being run in Docker container and maybe there is something wrong there.

How I have tried many different Docker containers and it happens in all of them. I have done routine many times before, usually separated by a few months. I must relearn each time.

Any Help appreciated. Thanks in advance.

Respectfully,

ErnestTBass

Attached Files

Thumbnail(s)
                   
Reply


Messages In This Thread
Cannot get to virtual environment in Jupyter IDE - by ErnestTBass - Sep-07-2020, 06:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with creating folder and "virtual environment" AudunNilsen 1 251 Mar-21-2024, 04:41 AM
Last Post: deanhystad
  Installing python packages in a virtual environment Led_Zeppelin 1 775 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  Problem with virtual environment standenman 2 1,016 Feb-23-2023, 07:09 PM
Last Post: standenman
Question Virtual Environment (using VS Code) Ashcora 4 14,169 Feb-15-2023, 07:17 PM
Last Post: snippsat
  How do I link the virtual environment of that project to the 3.9.2 version of python? Bryant11 1 1,381 Feb-26-2022, 11:15 AM
Last Post: Larz60+
  Project structure with a virtual environment gdbengo 1 1,450 Jan-26-2022, 03:22 PM
Last Post: snippsat
  Virtual environment path? Led_Zeppelin 1 2,315 Jul-22-2021, 01:40 PM
Last Post: snippsat
  virtual environment heye 4 2,488 Jul-04-2021, 06:47 AM
Last Post: ndc85430
  import statement in a virtual environment leodavinci1990 1 2,375 Mar-04-2021, 12:57 AM
Last Post: snippsat
  Virtual environment and upgrading python 3.5 to 3.9 NeilUK 4 12,177 Jan-24-2021, 01:02 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020