OK, finally I succeed.
To study Machine Learning, Python is the first choice. After 4 days’ learning the basic rules about Python, I go to the next step: Machine Learning.
Firstly, I installed
Python(x,y) On my Windows 8.1 .The speed of Theano is so slow that i can’t tolerate, So I decide to run it on my GPU. But there is a question: CUDA’s version must be suit with the Python’s version, which means i should install 32-bit CUDA on my 64-Bit Windows for the Python in Python(x,y) is 32-bit. I can’t tolerate at all! Well, you know, 32-bit driver in 64-bit system will cause some unknown problem and at the same time, the machine won’t run at it’s full speed.What’s more, if I want to use CUDA in Windows, Microsoft VS Suit must be installed which is very huge and will make my computer mass. I HATE IT!!
I tried to replace the Python in Python(x,y), but failed.
So, I turned into Ubuntu.
**There is a bug when you are using Wubi mode: You will see so many “DISK ERROR” when launching, and you can’t go into Ubuntu at all. Step 2~4 is the way to solve this problem. **
**If you have installed Ubuntu correctly, go to step 5 directly. **
- Firstly, Install Ubuntu using wubi mode.
- After installing, reboot. But * DO NOT GO INTO UBUNTU DIRECTLY *! Stay at the GRUB . Press
Eto edit the boot option. Find
ro rootflags=sync, change it into
F10to continue booting.
- Open terminal, execute
$sudo gedit /etc/grub.d/10_lupin
Find the 150th line, change
rw, save the file.
Back to terminal, execute
Update the software info with
$sudo apt-get update
Install Theano and its rely-ons
$sudo apt-get install python-numpy python-scipy python-pip python-nose g++
$sudo pip install Theano
Python 3.4+ have been correctly installed in ubuntu. If you like Python 2.7, run this(But it seems that it is unnecessary because the Python 2.7 have been installed??! OMG… Amazing…):
$sudo apt-get install python-dev
If you like Git, no problem:
$sudo apt-get install git
And I don;t know why I should install
libopenblas-dev, but I installed…
$sudo apt-get install libopenblas-dev
It won’t take long.
Run some test to see if these tools can be run:
Install NVIDIA driver
You can use the system’s
system configuration -&gt; software and updates -&gt; additional driversto install NVIDIA driver.
You can also use
$sudo apt install nvidia-331to install it.
To test if it’s correctly installed, use
If you see the response like
nvidia-331, 331.38, 3.13.0-24-generic, x86_64: installed, congratulations.
$sudo apt install nvidia-cuda-toolkit
Reboot your machine
Actually, your installation is finished. To test, you can
import theano;theano.test()in Python.
If you see something like
Using gpu device 0: GeForce GT 630M, Congratulations!
sudo vim ~/.theanorc
[global] floatX = float32 device = gpu
OK, enjoy it.
PS: Let’s have a bacon with the Dell’s FUN !