HOW TO SETUP PYTHON ANACONDA IN CENTOS
- Category : Server Administration
- Posted on : Sep 12, 2016
- Views : 2,218
- By : Edgardo D.
This tutorial is part of our ongoing series on CentOS 7 help and tutorials.
CentOS is a minimalistic distribution by nature. It was designed that way and there are countless benefits to not including things that certain users will not need or find useful.
When it comes to Python, CentOS does come with a base Python package but not much else. For the Pythonic power users out there, a more comprehensive distribution is usually needed.
Anaconda is a distribution for both Python and R, very popular among data scientists and machine learning coders. Today, we will see how to set up Anaconda in your CentOS server.
This tutorial will assume that you’re running CentOS 6 or 7.
First, log into your server via SSH. Then, create a directory to install Anaconda (it can be /root, but creating something specific is recommended). In this example, the directory will be /anac.
Let’s navigate to the directory:
cd /anac
Next, let’s retrieve the latest download link from the official site:
https://www.continuum.io/downloads
Click on ‘Linux’ and select the 64-bit installer for your preferred Python version. Right click and then ‘Copy link address’
Then, go back to your SSH session and download the .sh file to your server:
wget https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh
Once it’s done downloading, you can run the installer with the bash command:
bash Anaconda3-4.0.0-Linux-x86_64.sh
The installer will then begin and ask you a series of questions. Accepting the Terms and Conditions is pretty self-explanatory. Toward the end, when it asks if you want to append Anaconda to your OS’s PATH variable, select ‘Yes’. This will make running Conda commands a lot easier.
And there you have it! Anaconda is ready to be used. Here are some commands to get you started:
conda update NAME_OF_PACKAGE
conda install NAME_OF_PACKAGE
Note that Conda’s repo isn’t that extensive, so if you can’t find something through conda install, try pip install)
You might be wondering… why is it better to install Python through a third-party distribution instead of just updating the base Python that ships with CentOS? Good question. The simple answer is that CentOS ships with Python because the system actually needs it. If you update the core Python interpreter, you risk breaking certain OS utilities, such as yum. However, if you use a third-party distribution, you’re free to add/remove packages and update Python as much as you want, that your OS will remain fully operational.
Pro Tip #1: If you still decide to simply work with the base Python install, do not try to use Python 2.7 in CentOS 7. It’s not compatible. For using older versions of Python in CentOS 7, you must install a separate distribution of Python, like Anaconda.
Pro Tip #2: Depending on what you’re doing, sometimes running certain code, or getting certain packages installed in your environment, will require tools that CentOS doesn’t ship with. To solve that, install CentOS development tools, a comprehensive package of tools that will allow you to do basically anything needed for development on the system side:
yum groupinstall "Development tools"
Categories
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
Recent Articles
-
Posted on : Sep 17
-
Posted on : Sep 10
-
Posted on : Aug 04
-
Posted on : Apr 01
Tags
- ts
- myisam
- vpn
- sql
- process
- kill
- tweak
- server load
- attack
- ddos mitigation
- Knowledge
- layer 7
- ddos
- webmail
- DMARC
- Development
- nginx
- seo vpn
- Hosting Security
- wireguard
- innodb
- exim
- smtp relay
- smtp
- VPS Hosting
- cpulimit
- Plesk
- Comparison
- cpu
- encryption
- WHM
- xampp
- sysstat
- optimize
- cheap vpn
- php-fpm
- mariadb
- apache
- Small Business
- Error
- Networking
- VPS
- SSD Hosting
- Link Building
- centos
- DNS
- optimization
- ubuntu