11/13/2022 0 Comments Cool cool pikkaYou installed it in the wrong environment!īut you’re running Jupyter and not the console and how does it all fit together? We’re getting there just now. That is the reason you can’t import the package and you know you installed it. Unless you’ve modified $PYTHONPATH variable (it’s ok if you haven’t heard of it), each of these environments will use a completely separate set of packages. That reveals what environment of python you are currently in.ĭifferent python environment means different sets of packages So how do I know what environment is currently running? Easy! By running import sys sys.prefix in interactive console. I create and destroy python environments daily. I have multiple environments of python 3.6.3 (yes, all the same version) and they load dynamically depending on the project I am currently working on (thanks to conda). When I call python in my console – python 2.7.10 gets invoked when I call python3, python 3.7.1 is invoked. Because not all python2 tools are ported to python3, it is possible that your operating system runs both versions without you touching anything.įor example, I have both python 2 and python 3 installed. Not fine like this! It is actually fine and not your fault. You are running multiple environments of python. Once you understand that, you’ll have fewer problems installing and importing packages you need. Let’s build a basic understanding of what’s happening there and what causes your packages missing even after being installed. It’s actually about your machine running multiple python installations (environments). COOL COOL PIKKA INSTALLSeeing “ImportError: No module named tensorflow” but you know you installed it? Sometimes you can import packages from the console, but not from the Jupyter notebook? !pip install tensorflow sometimes just does not work?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |