![]() ![]() (tensorflow) administrators-MacBook-Pro-5:~ jheaton$ python Enter the python command and the following commands to check TensorFlow: 1 Next lets see if TensorFlow is installed. Notice how my prompt changed from (base) to (tensorflow)? This shows that you are now in the virtual environment named “tensorflow”. (tensorflow) administrators-MacBook-Pro-5:~ jheaton$ (base) administrators-MacBook-Pro-5:~ jheaton$ conda activate tensorflow This shows a successful activation of the virtual environment: 1 You can also use the following command (on Windows/Linux): 1 On Windows you will need to run an “Anaconda Prompt”.įirst, try to access your virtual environment. First open a commmand prompt or “Anaconda Prompt”. Linking an Environment to Jupyterĭo you not see any new environments, such as “Python 3.6 (TensorFlow)” in the dropdown list when you select to create a “New” environment? If this is the case, you probably did not execute the final commands in the installation instructions. You can also choose “Change Kernel” from the menu to change the kernel of a previously created notebook. ![]() I have quite a few different virtual environments! You will not have this many, but you should see the “Python 3.6 (TensorFlow)” that you created earlier. To make sure that you are using the correct environment click “New” and create a new notebook of the correct type, such as shown here: The following notebook is in the correct environment. Note: I might have updated the instructions to a version later than Python 3.7 once TensorFlow (and related libraries fully support later versions of Python). When we setup TensorFlow we created a new virtual environment named “Python 3.6 (TensorFlow)”. Notice The words “Python 3” near the upper-left corner of the image? This is the baseline Python environment. In the above image, this error is occuring because I am not in the correct Python virtual environment. Make Sure you are in the Right Virtual Environment However, for the purposes of this post I will assume that you have followed the setup instructions that I provide here. There are several ways to setup TensorFlow. I will cover some of the most common ones here. This error can be caused by a variety of issues. This error usually looks something like the following: A common question that I get both from students of my class and also YouTube channel is why do I get either an ImportError or ModuleNotFound error on TensorFlow when using Jupyter. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |