python cannot install tensorflow - python

My PC is 64 bit and python version is 3.7.9. I installed tensorflow as following. Does anyone know how to solve it? Let me know if further information is needed.
Edit:
I also tried anaconda as follow:
https://www.tutorialspoint.com/tensorflow/tensorflow_installation.htm
But the problem is that in anaconda prompt, I can import tensorflow. I use python in visual studio 2017. When I open python file in VS, it seems different with anaconda prompt. Do you know how to make it also work in VS?

The version of Python your using is too new for the version of TensorFlow your using.
If you go here: https://pypi.org/project/tensorflow/1.13.1/, and look on the left hand side and scroll down to "Programming Language", you will see the latest python version on that list is Python 3.6.
That is the cause of error your getting. You can either:
Switch to Python 3.6 or
Use TensorFlow 1.14.0 or above which supports Python 3.7
Also make sure your using the 64-bit version of Python. TensorFlow will not install if you have the 32-bit version of Python installed.

Could you try:
pip install --upgrade tensorflow

Related

Update Python to 3.8 and the modules doesn't work

I had Python3.5.2 installed on /usr/bin/.
All the modules include scipy and numpy works well.
But, after I installed Python3.8 the modules scipy and numpy doesn't work.
I saw that Python3.8 is in usr/local/bin instead usr/bin.
So, how can I run Python3.8 using all the modules like I used with Python3.5.2?
Python 3.8.0 was just released on 2019-10-14, so several modules are not yet supported (as of 2019-10-31). SciPy, Matplotlib, and SciKit-Learn are not yet supported. These may be supported by the time 3.8.1 is released in 2019-12-16.
Numpy and Pandas are supported, but for the others you will need to continue using a supported version of Python. To keep both versions on your machine, I would recommend using a virtual environment.

No module named 'tensorflow'

I have installed tensorflow (1.6.0) in Visual Studio 2017, but I get the following error when I run the code:
No module named tensorflow
Any help?
Check that you installed it in the same runtime that Visual studio is using for the code i.e. Visual studio may be pointing to one python installation, but you installed tf on a different python installation.
you must install it on Python 64bit version n
example: python3.6 on Windows
1.1. on cmd cd C:\Users\<user_name>\AppData\Local\Programs\Python\Python36\Scripts
1.2. execute this commande pip install tensorflow
then in the IDE you must select the right version of Python (ex: the version when you install tensorflow python3.6 64bit)
check this doc maybe help you

Switch from Python 3.4.2 to Python 2.7.1 OSX

I got an issue with my following demand. First of all i'm a total newbie, so please don't be too rude with me ;) I did install Python 3.4.2 along with PyCharm once (recommendation of a friend), but found a promising tutorial now, which recommends Python 2.7.1 badly, working with the Terminal and TextWrangler --> http://learnpythonthehardway.org/book/. Somehow i didn't figure out how to uninstall 3.4.2 or switch to 2.7.1, 'cause the terminal keeps saying i'm still in 3.4.2. I did some research in the web, but got really confused and couldn't find any matching issue to mine.
Although it can be confusing, you can have both a v2.x and a 3.x version installed on your system. If you have installed a python 2.7.1 after your python 3.4.2, you should be able to run your python 2.7.1, just type python2 in place of python.
Try out :
python --version
python2 --version
to check which version are installed.

Matplotlib won't install properly on Python 3.5

I've just installed Python 3.5 to experience its functionality. The problem is that all the modules I use in my daily programming have been installed and run very well on it except Matplotlib. I installed it via pip and never faced any errors while installing, but when I wanted to import it, the error saying, DLL load failed: The specified module could not be found. popped up.
What's the matter with Python 3.5, or Matplotlib?
Uninstall the module using pip uninstall matplotlib then install it again using http://matplotlib.org/downloads.html
Obtain the .exe file that best fits your machine, in my case it would be matplotlib-1.4.3.win-amd64-py3.4.exe. This will be a more complete version of matplotlib for windows rather than using pip.
I would also consider rolling back to Python 3.4 unless you absolutely need 3.5. There shouldn't be a compatibility issue between 3.4 and 3.5 for Python, but as far as matplotlib it's been tested with 3.4, but if you run through problems on 3.5 I would roll back.
If you have Python 3.5 you should install MS's Redistributable DLLs to make matplotlib working on Windows... In my case, no need to reinstall matplotlib even...
Try this example without. If error appears install that and try with it (you must log in MS site and download version for arch you using - i tested x86 only, Windows 7, Python 3.5).
That case is included in matplotlib install documentation!
Remember, you should always read documentation before you ask!

Install Opencv for Python on Windows

I try to install opencv for python. I use windows x64. I install numpy1.6 and python2.7. I have installed opencv2.4.9. I install them succesfully. I guide from this page. It says that
Now open your "Python IDLE" ( from Start > All Programs > Python 2.7 > Python IDLE ) and just type following :
import cv2
When I run import cv2, I get below error :
module compiled against API version 9 but this version of numpy is 6.
How can I know compatible version?
I know this question enter link description here. But I installed latest numpy version, it didn't solve my problem.
Use https://www.scivision.co/install-opencv-3-0-x-for-python-on-windows/
It's going to lead you to http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv where you can download a .whl installer. After you download it, you can run it using
pip install some-file.whl
assuming you have pip installed. After that you should be able to import cv2.
I had the same problem and I did a ton of research but this is the only one that worked.

Categories