in Education by
I'm trying to install some machine learning libraries on a new Windows laptop (I usually have Mac laptops in case that matters). I set up a virutal environment with python 3.6.8 (since that is highest version for tensorflow/keras). Installed the keras library and everyhting went well. Now, in a terminal, I activated my virtual environment conda activate mlenv then checked the libaries installed via conda list and Keras 2.2.4 is there. Next in a terminal I run `import keras' and get the "Using TensorFlow backend" output, confirming it is installed correctly. But in that same environment, when I run a python file from Code Studio, which imports keras, I get a No module named 'keras' error. I have uninstalled and re-installed and still have the same issue. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Thanks Steve. That comment led me to the answer. So, even though the terminal showed that it was in the mlenv environment I created as: (mlenv) Y:\MaRoss\> when I Run Python File in Terminal, Code Studio's current python interpreter (i.e. environment) is called and the file is run within it rather than the mlenv one. Meaning the environement which didn't have Keras installed. Trying to switch interpreters by running the Python: Select Interpreter command in the command palette wasn't showing the virtual environments I created (https://code.visualstudio.com/docs/python/environments). Which apparently Windows has trouble recognizing new environments. Had to restart Code Studio, it recognized the environment, switched intepreters and all ran correctly. Thanks.

Related questions

0 votes
    I'm trying to install some machine learning libraries on a new Windows laptop (I usually have Mac laptops ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I'm trying to install some machine learning libraries on a new Windows laptop (I usually have Mac laptops ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 10, 2022 in Education by JackTerrance
0 votes
    I am trying to install awscli using pip3 on Linux Mint 17.2 Rafaela. I am getting the error: Traceback (most ... anyone help with this? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I'm stuck with this error for one on my app : Traceback (most recent call last): File "manage.py ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I am trying to install apache spark to run locally on my windows machine. I have followed all instructions ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    I followed these steps on https://github.com/karmi/tire to install elasticsearch for use with ruby on rails ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 30, 2022 in Education by JackTerrance
0 votes
    I'm trying to deploy a Docker container image to AWS using ECS, but the EC2 instance is not being created. I have ... , to begin with!! Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    Every time I want to config something with AWS I get the following error : "The config profile (myname) ... encrypt my credentials. Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    When using model.compile(optimizer = tf.train.AdamOptimizer(), loss = 'sparse_categorical_crossentropy', metrics=[' ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 13, 2022 in Education by JackTerrance
0 votes
    I installed Ubuntu 12.04 on my instance and am trying to install packages using apt-get, but I am getting the ... do I fix this? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I would like to get a list of Python modules, which are in my Python installation (UNIX server). How can ... in your computer? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    Python's easy_install makes installing new packages extremely convenient. However, as far as I can tell, it doesn't ... or similar)? Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    I'm trying to follow PEP 328, with the following directory structure: pkg/ __init__.py components/ Core.py __init__ ... m missing here? Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, ... a configuration option. Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    It has been found that if A and B play a game 12 times, A wins 6 times, B wins 4 times and they draw twice. ... 19 27 D. none of these Select the correct answer from above options...
asked Nov 16, 2021 in Education by JackTerrance
...