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!

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

9 Comments

i did uninstall and reinstall anaconda and could not import numpy without copying dll's and adding Anaconda3\Library\bin to the path.
@RayTayek are you sure you ticked the add to path box during setup?
no, i probably did not check that box as there was a warning about doing that.
@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.
@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: datacamp.com/community/tutorials/installing-anaconda-windows
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.