Trying to put Google's TensorFlow into Python to study machine learning
pip install tensorflow
And install normally. Installation is completed without any problems. Here, if you check if you can import properly ...
Using TensorFlow backend.
Traceback (most recent call last):
File "C:...
...
File "C:...
return _load(spec)
ImportError: DLL load failed:The specified module cannot be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:...
...
File "C:...
return _load(spec)
ImportError: DLL load failed:The specified module cannot be found.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Error appears (it is long, so omitted in the middle). After that, I researched various things and did various things, but I couldn't solve it.
If you install without specifying the version, the latest version tensorflow == 2.1.0 at the time of article creation will be installed, so specify the old version at the prompt and execute it.
pip install --upgrade tensorflow==2.0.0
Then start the interpreter with the python
command
>>> import tensorflow
When I checked with, no error occurred and the import was successful. I'm not sure, but it seems that some TensorFlow instructions cannot be executed with an old CPU.
For the time being, when I specify version 1.10.0 specified on other sites and install it,
pip install --upgrade tensorflow==1.10.0
ERROR: Could not find a version that satisfies the requirement tensorflow==1.10.1 (from versions: 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 1.15.0rc0, 1.15.0rc1, 1.15.0rc2, 1.15.0rc3, 1.15.0, 1.15.2, 2.0.0a0, 2.0.0b0, 2.0.0b1, 2.0.0rc0, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.1.0rc0, 2.1.0rc1, 2.1.0rc2, 2.1.0)
ERROR: No matching distribution found for tensorflow==1.10.0
I got an error like this and was angry that there was no such version, so I groped for a version without an error from the versions lined up.
Also, when I installed it, I got an error saying "Access is denied", so as I was told
pip install --upgrade tensorflow==2.0.0 --user
And added the --user
option. Probably because I installed Anaconda with administrator privileges (I didn't see this option on other sites, so I removed it from the previous description).
Recommended Posts