A screen shot of my problem
I have been trying to install Keras for about a week now. I installed Anaconda and then Tensorflow with Python3.5 and Jupyter. When I start up with the Anaconda3 prompt it always gives me the message
>was unexpected at this time
C:\Users\Ray Van>#IF NOT "==" #chcp > NUL
C:\Users\Ray Van>
I used to be able to just say
Jupyter Notebook but it doesn't like this
Also I want to say activate tensorflow and then say jupyter notebook and then run a Python program with Keras (for Neural networks) but no matter what I tried, nothing works. I read somewhere that having the blank in the name \Ray Van] can be a problem but I didn't set that up. Somehow it was just set up by Windows 10 and from reading various posts, it seem very difficult to change without risking having to install Windows10 again. Various places say that it is very easy to install Keras, but I have found the opposite after trying several days for 3 hours at a time. But I am not good at installing things like this and don't really understand how all the things are connected. Maybe I have to start over and install Anaconda and then tensorflow and then from within the tensorflow environment install Keras and Jupyter. I know the pip command or the conda command are used for this but I don't really understand that either. So a total newbie who just wants to run some Python programs for my Neural Network research using Keras.
Related
So I am quite new to this I was trying to find answers on google but it is kind of not working. So I am trying to run this library ImageAI library
I am able to run it normally on the CPU at least I think it runs on CPU by just calling python test.py. Am I correct there
But since the model prediction takes a long time I would like to run it on my GPU. What I was trying to do is create a conda environment and activate it but after I do I get this error.
ModuleNotFoundError: No module named 'imageai.Classification'
Although I have imageai installed in my environment
pip freeze | findstr imageai
imageai==2.1.5
As you can see by executing this command. What am I doing wrong here?
I found the solution it doesnt require the conda environment. ImageAI automatically runs on GPU if available. All you need to do is to ensure you have the GPU version of Tensorflow installed.
To start out I had a anaconda installation with python 3.5.2. After doing a pip tensorflow installation I got an error something like "nosetest...". I searched stackoverflow and got a suggestion to move to python 3.6.
So I uninstalled the whole of anaconda and python. Then did complete fresh install of anaconda with python 3.6.10. Did a pip install of tensforflow. launched spyder and jupyter and could not import tensorflow. However, when I issue commands from python command prompt things work fine.
So can't seem to get tensorflow to import in spypder or jupyter.
Lastly following another suggest I ran the c:/from/my/anaconda/Scripts/activate base. But that also didn't work in spyder. However in jupyter it seemed to import but then crashed on tf.version
with access violation.
Can you please help, I've tried many things and suggestions, can't seem to get tensorflow to work with python 3.5 or 3.6.
Thanks.
P.S. I remember using python3.5.2 sometime ago with the then tensorflow, I think version 1.1x and everything went smoothly, everything installed and imported worked beautifully.
I'm currently working on a program to play a game similar to atari-games. I'm using keras (python 3). I finished writing the code and I want to test it, and I have few questions about the process:
first of all, I have trouble importing tesnorflow for some reason. I've installed it using pip. I've made sure to created new env. before the installation (which finished successfully), but when I try to run my program it says:
ModuleNotFoundError: No module named 'tensorflow'
I also, tried to install the package from within pycharm, but then I get this error:
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
I've checked program requirements (such as pip, python, virtualenv and setuptools versions) and everything seems up to date. perhaps someone could point out what else might be the problem?
Is there any other way I can test the performance of my program?
Thank you very much for your time and attention.
Anaconda is a complete time-saver. I suggest create an enviornment using Anaconda and install the tensorflow by conda install tensorflow If you would like to use the gpu version, conda automatically installs the CUDA and cudnn for you too.
Do I absolutely need to use jupyter notebook to run TensorFlow in Windows ?
I tried the detect object example with the jupyter notebook, it works but I'm not really comfortable, Im used to notepad++ and running python directly on my windows without virtual environment.
I tried to copy past all the codes but I run into many hugs.
No, it is not compulsory to use Jupyter notebook to run Tensorflow on Windows. I personally use PyCharm as my IDE and Anaconda for dependency management (this is completely optional).
I would recommend you to use a proper IDE instead of notepad++ because it's much easier to do debugging using an IDE. You'll also be cloning a lot from Git when you start developing your own model, and usually the open source models out there has a lot of classes and methods in it (take Google's Inception net for example).
Another alternative would be maybe you can start posting about the bugs you are facing, then we can all start helping you.
For the Encoding categorical data data section, the first time I ran it, I got an error because I didn't have sklearn installed. After I installed it and re-run, I got In [ * ]. No matter how many times I run it, it's not executing. Basically, after an error is made, all lines can't be executed again.
One thing I found out is that this Jupyter Notebook is under tensorflow environment. This is what I did from the beginning:
1.Create tensorflow environment, then install tensorflow
2.Import the libraries, it didn't work because matplotlib not installed by default
3.Then install matplotlib
From my own troubleshooting, this is where the problem begins. So I tried to uninstall matplotlib, it's fine again as shown.
Now even there's an error, I can still re-run the line and the execution is fine because the number will be updated instead of [ * ].
Then the problem arises again because if I keep running it, it will turn into [*] again after maybe 3rd or 4th times. The thing is if I do the same thing with Jupyter notebook under root environment(no tensorflow installed, matplotlib is installed), I can keep re-running it for as many times and there's no problem(the number will be changed). So what's wrong with it?
It seems the problem came from tensorflow python 3.6. I tried many different methods to troubleshoot. Lastly I removed tensorflow environment, and reinstalled as python 3.5, Jupyter notebook is working fine now. It won't stop executing. Does 3.6 have to be fixed?