1. Installing pycharm
Download and install pycharm from https://www.jetbrains.com/pycharm/download/#section=linux
2. Installing PIP
PIP is an easy installer for python packages
$ sudo apt-get install python-pip python-dev build-essential
$ sudo pip install --upgrade pip
$ sudo pip install --upgrade virtualenv
3. Installing required python packages
$ pip install numpy
$ pip install scipy
$ pip install scikit-learn
4. Setting up pycharm
1. Go to pycharm downloaded folder and extract pycharm-{}.tar.gz file into a preferred location. 2. Execute pycharm.sh file 3. Click File -> New Project and create a project providing project name 4. Right click on your project -> new -> python file and create new python file providing file name 5. Add following import lines to your python file
HelloWorld.py
import csv
import numpy
import scipy
from sklearn import preprocessing
from sklearn import neighbors
from sklearn.cross_validation import train_test_split
from sklearn import metrics
from sklearn.naive_bayes import GaussianNB
from sklearn import cross_validation
from sklearn.grid_search import GridSearchCV
Note: If you are getting any import error click
- File -> Default Settings -> Project Interpreter
- Select python 2.7.x version
- Click Apply -> Ok
Happy coding...!!!!
No comments:
Post a Comment