1

I am new to the python environment. Trying to get the code from this book to work on windows 8.1.

After a bunch of problems with modules not being found (like ssl and numnpy) and trying different version of python, I got with conda 4.5.12 and Python 3.7.1. installed. I had to move the mkl_*.dll's to d:\Anaconda3\Library\bin and added d:\Anaconda3\Library\bin to the path to get by this problem and get numpy to import. Not sure I have broken anything by doing this.

Is there any way to get a clean install on windows 8.1 so that numpy works?

Trying to install tensorflow gets:

D:\ray\dev\conradapps\dlgopy\dlatgog\code>conda install tensorflow
Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - anaconda==2018.12=py37_0 -> bleach==3.0.2=py37_0
  - anaconda==2018.12=py37_0 -> numexpr==2.6.8=py37hdce8814_0
  - anaconda==2018.12=py37_0 -> scikit-learn==0.20.1=py37h343c172_0
  - tensorflow

What should I do to get tensorflow installed?

edit: trying some of this.

getting some warnings:

done
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\_bz2.pyd.c~.  Please remove this file manually (y
ou may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\_lzma.pyd.c~.  Please remove this file manually (
you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\_queue.pyd.c~.  Please remove this file manually
(you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\_socket.pyd.c~.  Please remove this file manually
 (you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\select.pyd.c~.  Please remove this file manually
(you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\DLLs\unicodedata.pyd.c~.  Please remove this file manu
ally (you may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\python.exe.c~.  Please remove this file manually (you
may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\python3.dll.c~.  Please remove this file manually (you
 may need to reboot to free file handles)
WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(89): Could not remo
ve or rename d:\Anaconda3\python37.dll.c~.  Please remove this file manually (yo
u may need to reboot to free file handles)

files were easily deleted without rebooting. now i can import tensorflow.

trying keras next.

keras is importing!

Ray Tayek
  • 9,841
  • 8
  • 50
  • 90

1 Answers1

1

The easy solution:

1) Uninstall Anaconda - it will be called something like "Python 3.7.1 (Anaconda3 2018.12 64-bit)".

2) Reinstall Anaconda, but this time tick box during setup to add Python to your PATH.

3) Tensorflow and numpy should work out of the box with no additional installations required. For example, from my terminal I can run:

C:\Users\vasil>python
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np
<module 'numpy' from 'C:\\Users\\vasil\\Anaconda3\\lib\\site-packages\\numpy\\__init__.py'>
>>> np.absolute(-1)
1
vs97
  • 5,765
  • 3
  • 28
  • 41
  • i did uninstall and reinstall anaconda and could not import numpy without copying dll's and adding Anaconda3\Library\bin to the path. – Ray Tayek Feb 14 '19 at 01:39
  • @RayTayek are you sure you ticked the add to path box during setup? – vs97 Feb 14 '19 at 01:39
  • no, i probably did not check that box as there was a warning about doing that. – Ray Tayek Feb 14 '19 at 01:45
  • @RayTayek I've configured Python on many environments and never had an issue after ticking that box. I would suggest you go ahead and try with it ticked. – vs97 Feb 14 '19 at 01:47
  • @RayTayek The idea is that if you dont tick that box, it means you will have to use Anaconda Navigator or the Anaconda Command Prompt (located in the Start Menu under "Anaconda") when you wish to use Anaconda. If you want to be able to use Anaconda in your command prompt (like above), the box must be ticked. Taken from here: https://www.datacamp.com/community/tutorials/installing-anaconda-windows – vs97 Feb 14 '19 at 01:50
  • i may if what i am doing does not work. but i just got keras installed. – Ray Tayek Feb 14 '19 at 01:50
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/188372/discussion-between-vs97-and-ray-tayek). – vs97 Feb 14 '19 at 01:59
  • trying your method. seems to be a bit easier to deal with. – Ray Tayek Feb 25 '19 at 01:19
  • Just another thought about that: there is a difference between user and system wide installation of python/anaconda and so on. The warning is about conflicting ones and shouldn't be ignored imho – Cadoiz Jul 26 '20 at 16:02