Python

how to use virtualenv in pycharm

Go to the project folder enter command: virtualenv venv Pycharm setup Then goto the pycharm project. Open File->Settings->Project->Project Interpreter Select the 'venv' folder. Now go to Terminal in Pycharm. Run this: python -c "import sys; print(sys.path)" If this terminal is using the Default python, not the Virtualenv, then from the terminal run this: source venv/bin/activate… Continue reading how to use virtualenv in pycharm

Advertisements
Uncategorized

Docker swarm commands

Start a swarm in the manager node: docker swarm init --advertise-addr To join swarm cluster as worker or manager docker swarm join \ --token SWMTKN-1-49nj1cmql0jkz5s954yi3oex3nedyz0fb0xx14ie39trti4wxv-8vxv8rssmk743ojnwacrr2e7c \ 192.168.99.100:2377 To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. If you forget above command, run following command to regenerate it from… Continue reading Docker swarm commands

Python

How to setup pycharm and install python

Go to following link and download pycharm. https://www.jetbrains.com/pycharm/download/#section=linux Install python 2.7.12 first install the dependencies $ sudo apt-get install build-essential checkinstall $ sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-de Download python in the following location $ cd /usr/src $ wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz        

Python

Python

Everything I learned from the following site. https://www.tutorialspoint.com/python/python_environment.htm PYTHONPATH It has a role similar to PATH. This variable tells the Python interpreter where to locate the module files imported into a program. It should include the Python source library directory and the directories containing Python source code. PYTHONPATH is sometimes preset by the Python installer.… Continue reading Python