Recently I am using the virtual machine to do the Python coding. The system is under Linux, which means I have to use Command Lines to install the Python packages. I am familiar with Anaconda to do Python coding at school. But in the real working environment, to save money, I have to use Linux.
Now I have a problem in installing the Python packages. Like I used to use pip to install, now I have to use Sudo. There is some information about how to install from the website, for
$ sudo apt install Python-pandas
But I don’t know how to install the class. For example, I would like to conduct a linear regression analysis. I installed the sklearn successfully.
$ sudo apt install python-sklearn
How can I install sklearn.linear_model and import LinearRegression and how to import train_test_split from sklearn.corss_validation?
Can I do it in eclipse? Or the only way is to install in Linux. Anyone can help?
Advertisement
Answer
- you can install anaconda in linux
- the package includes all of the classes
- sudo is all lower case
- you can still use
sudo pip install
orpip install --user