-
Notifications
You must be signed in to change notification settings - Fork 0
Installation on CentOS or MacOS
Install python3 into virtualenv and install Django package
This example is for CentOS. You can find a example of how to do it on MacOS here: https://www.codingforentrepreneurs.com/blog/install-django-on-mac-or-linux/
sudo yum install centos-release-scl
sudo yum install rh-python36
scl enable rh-python36 bash
cd ~
mkdir PyCharmProjects
cd PyCharmProjects
mkdir InVEx
scl enable rh-python36 bash
python -m venv virtualenv36
source virtualenv36/bin/activate
pip install django
pip install pandas
pip install sklearn
exit
Get project from GitHub - https://github.com/PanDAWMS/InVEx
git clone https://github.com/PanDAWMS/InVEx.git
Create a pure python project in the created ~/PyCharmProjects/vap/ directory
Go to:
File -> Settings -> Project -> Project interpreter,
then put the path to installed python3 into virtual environment (e.g. > /home/tkorchug/PyCharmProjects/virtualenv36/) and python3 itself > (/home/tkorchug/PyCharmProjects/virtualenv36/bin/python3).
If everything is specified right you will see list of installed python packages, like Django and you can interactively install any other.
Go to:
File -> Settings -> Languages&Frameworks -> Django -> Enable Django
and specify 3 paths:
Django Project Root = e.g. > /home/tkorchug/PyCharmProjects/InVEx/
Settings = core/settings
Manage Script = e.g. > /home/tkorchug/PyCharmProjects/InVEx/manage.py
Go to:
Run -> Edit Configurations
add new one by pressing on + and choosing DjangoServer from a dropped down list. Copy and rename local.py-example.py to local.py (located in core/settings), where put proper full path to django-sensitive-data file [*]. it must contain SECRET_KEY and DEBUG=True. Later it will contain DB or ES access data if we need it, etc.
After that you should be able to run project.
[*] This file will contain sensitive information such as password to DB etc, therefore it is supposed to be kept secretly and distributed along developers separately. As of November 12, Maria and me (Tatiana) can provide it.
Install PyCharm (it is important it supports Django Server and remote interpreter)
get project from
github https://github.com/PvapMS/InVEx
Create pure python project with root project path where project from github is located
Go to:
File->Preferences -> Project -> Project interpreter,
then add SSH interpreter (or Remote in older version of PyCharm)
Host: nosql.tpu.ru
Port: 22
Username and Password - ask Sasha
Path: /data/virtualenv36/bin/python3
Go to:
Tools -> Deployment -> Configuration,
add new by pressing on +.
Type: SFTP
SFTP host: nosql.tpu.ru
Port: 22
Root path [on nosql.tpu.ru] - /home/{your username}/
Username and password - ask Sasha
Local path:
e.g. [/home/tkorchug/PyCharmProjects/InVEx/]
Deployment path on remote server:
/InVEx - this is continuation of root path [on nosql.tpu.ru]
Then you should be able to deploy all project files and folders to nosql.tou.ru by pressing:
Tools -> Deployment -> Upload to
Go to:
File -> Preferences -> Languages&Frameworks -> Django -> Enable Django
and specify 3 paths:
Django Project Root = e.g. /home/tkorchug/PyCharmProjects/InVEx/
Settings = core/settings
Manage Script = e.g. /home/tkorchug/PyCharmProjects/ImVEx/manage.py
Go to:
Run -> Edit Configurations
add new one by pressing on + and choosing DjangoServer from a dropped down list
Host: nosql.tpu.ru
Port: any, preferably from 8001 to 8079 to avoid using the same port by different users
Check, that Python Interpreter is remote which was created in b)