PROBLEM: A program I'm trying to use requires tensorflow-gpu==1.15.4.
WHAT I'VE DONE (in order):
pip install tensorflow-gpu==1.15.4failed, so I did some some quick research I found that tensorflow-gpu doesn't exist anymore and that I should just use tensorflow:- I then tried to run
pip install tensorflow==1.15.4, which also failed, and after doing some more research I found that tensorflow 1.15.4 will only work on Python 3.5-3.7. - So, I installed python 3.7, opened a virtual environment in Python 3.7.0, and tried running
pip install tensorflow==1.15.4, which failed:
PS C:\Users\username\Documents\Projects\project143> pip install tensorflow==1.15.4
ERROR: Could not find a version that satisfies the requirement tensorflow==1.15.4 (from versions: none)
ERROR: No matching distribution found for tensorflow==1.15.4
- I downloaded the wheel tensorflow_gpu-1.15.4-cp37-cp37m-win_amd64.whl from pypi and tried to pip install it and I'm getting:
(my_venv) PS C:\Users\username\Documents\Projects\project143> python -m pip install --upgrade .\tensorflow_gpu-1.15.4-cp37-cp37m-win_amd64.whl
ERROR: tensorflow_gpu-1.15.4-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
even though I'm using Python 3.7.0 on a Windows PC.
I tried doing all the above using Python 3.6.0 and got the same results
I tried using pip 10.0.1 and pip 24.0. Both version gave the same output.
EDIT: pip install tensorflow just doesn't work at all on Python 3.7.0 for some reason:
PS C:\Users\username\Documents\Projects\project143> pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
Now I'm kind of just stuck. Does anyone know how I could get tensorflow==1.15.4 installed on my Windows 11 machine? Thank you.
UPDATE: Managed to install tensorflow 1.15.0 via pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.5.0-py3-none-any.whl but now when I run my code I get the following error:
Traceback (most recent call last):
File "C:\Users\username\Documents\Projects\project143\my_venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(__file__)])
File "C:\Users\username\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\username\Documents\Projects\project143\my_venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\username\Documents\Projects\project143\my_venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\username\Documents\Projects\project143\my_venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
import _pywrap_tensorflow_internal
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".\project143.py", line 7, in <module>
from tensorflow.contrib.training import HParams
File "C:\Users\username\Documents\Projects\project143\my_venv\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Users\username\Documents\Projects\project143\my_venv\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\username\Documents\Projects\project143\my_venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\username\Documents\Projects\project143\my_venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [dirname(__file__)])
File "C:\Users\username\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\username\Documents\Projects\project143\my_venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\username\Documents\Projects\project143\my_venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\username\Documents\Projects\project143\my_venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
import _pywrap_tensorflow_internal
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Does this help answer my problems with tensorflow in general?
Try reinstalling pip. If that doesn't work, try that again and restart your computer. Then see.