Repo containing resources for the Social Networks Analysis course (PMS @ AUTh CS Dept.)
Instructors: Ilias Dimitriadis (idimitriad@csd.auth.gr), Vasilis Souvatzis (vasisouv@csd.auth.gr)
We are going to be using python 3.6 for these lessons (despite 3.7 being the latest stable release) to avoid possible packages incompatibilities.
- Download the official Python installer (v3.6.5)
- Run the executable and proceed with the installation. (IMPORTANT: You want to be sure to check the box that says Add Python 3.x to PATH as shown below to ensure that the interpreter will be placed in your execution path.)
- Ubuntu:
$ sudo apt-get update
$ sudo apt-get install python3.6
NOTE: If you are using Ubuntu 14.04 or 16.04, Python 3.6 is not in the Universe repository, and you need to get it from a Personal Package Archive (PPA). For example, to install Python from the “deadsnakes” PPA, do the following:
$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt-get update
$ sudo apt-get install python3.6
- Arch
packman -S python
For other versions check this link
A detailed step-by-step guide can be found here
Virtual environments are isolated python interpreters for each project or a group of projects. Creating a virtual environment for every new python project allows you to have different versions of each module installed in every isolated environment, ensuring less module conflicts.
Some editors/IDEs like Jetbrain's PyCharm, Sublime Text, Visual Studio Code or Atom have graphical interfaces for creating such environments. If you use some of the above check out the corresponding links:
If these links do not suite your needs, the command line approach is as follows:
- Open the terminal
- Ensure that python is installed by using
python -V
- Create a folder that will serve as your new project's root directory.
- Navigate to that folder using the terminal.
virtualenv venv
source venv/bin/activate
Your terminal should now include a (venv) prefix, thus allowing you to install packages using pip
to your virtual environment and not globally.
After your virtual environment is set and activated you can install packages automatically required for those lessons by:
pip install -r requirements.txt
For any question or obstacle you may encounter, do not hesitate to contact us.