Running virtualenv with interpreter /usr/bin/python3.5 (test1) implement python version which differs from the one which we are globally using (2.7.12) we have to add parameter mkvirtualenv -python=/usr/bin/python3.5 env35 Written with the name of specific virtualenv e.g workon test1 it manage you to this Python workon test1 Lonely it list all available virtual workon Workon command is responsible to change your virtualenv, or choose one if none is selected: If you would like to exit current environment, just type the deactivate deactivate (test1) now, everything what is installed by pip command will be stored in directory. er_scripts creating /home/eouser/.virtualenvs/test1/bin/get_env_details er_scripts creating /home/eouser/.virtualenvs/test1/bin/postactivate er_scripts creating /home/eouser/.virtualenvs/test1/bin/preactivate er_scripts creating /home/eouser/.virtualenvs/test1/bin/postdeactivate er_scripts creating /home/eouser/.virtualenvs/test1/bin/predeactivate New python executable in /home/eouser/.virtualenvs/test1/bin/python Use mkvirtualenv command and fill in the blank space with the mkvirtualenv test1 We might create our first virtual environment. Source ~/.bashrc (or accordingly source ~/.profile or source ~/.bash_profile) command reffered to the virtualenvwrapper.sh executable file and created hidden directory in home/econsole/.virtualenvs where the new enviroments will be located.Ĥ. er_scripts creating /home/eouser/.virtualenvs/get_env_details er_scripts creating /home/eouser/.virtualenvs/postactivate er_scripts creating /home/eouser/.virtualenvs/preactivate er_scripts creating /home/eouser/.virtualenvs/postdeactivate er_scripts creating /home/eouser/.virtualenvs/predeactivate er_scripts creating /home/eouser/.virtualenvs/postrmvirtualenv er_scripts creating /home/eouser/.virtualenvs/prermvirtualenv er_scripts creating /home/eouser/.virtualenvs/postmkvirtualenv er_scripts creating /home/eouser/.virtualenvs/premkvirtualenv er_scripts creating /home/eouser/.virtualenvs/initialize er_scripts creating /home/eouser/.virtualenvs/postmkproject er_scripts creating /home/eouser/.virtualenvs/premkproject Next we are able to apply these changes to current session with source source ~/.profile The third line tells the shell to execute virtualenvwrapper.sh during initialization. The second line tells the operating system about virtualenv location. The first line tells the shell where the projects will be stored(We have to create this folder with “mkdir ~/.devel” command) Source /usr/local/bin/virtualenvwrapper.shĮxport VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv Source $HOME/.local/bin/virtualenvwrapper.shĮxport VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv Scroll down at the very end and add three lines which are needed.Įxport VIRTUALENVWRAPPER_VIRTUALENV=$HOME/.local/bin/virtualenv Use text editor to edit bash file for exporting Paths:Įxample 3: for Centos 7 (both types of user is included) Now we have to configure shell file to automate starting virtual enviroments during the start of the system. We downloaded the whole stuff which is the core of our task. USR/LOCAL/BIN/VIRTUALENVWRAPPER.SH NO SUCH FILE OR DIRECTORY INSTALLTo get those packages we will use pip: (use sudo in pip install virtualenvģ. Virtualenvwrapper(extension for virtualenv) Now we have to install some additional packages, which are neccessary to accomplish the installation: If you do not have Python installed on your operating system, please follow those steps for sudo apt install sudo apt-get install -reinstall python-pkg-resourcesĢ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |