M
M
Mr.nobody2018-08-21 20:59:08
linux
Mr.nobody, 2018-08-21 20:59:08

How to set up virtualenv on CentOS6?

Hello. My home computer is running Ubuntu 16.04. Installed virtualenv, python3.6, at the end of the .bashrc file I wrote
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS=' -p /usr/local/bin/python3.6 '
export PROJECT_HOME= $HOME/Projects
source /usr/local/bin/virtualenvwrapper.sh
everything works.
The VPS server has CentOS 6.9 installed. Python3.6, installed virtualenv and virtualenvwrapper, but can't find .bashrc file, virtualenv commands don't work all and are different from commands in Ubuntu, I suspect it's related to .bashrc file.
How to properly set up virtualenv on CentOS? What are other ways to create a virtual environment? Please advise how to move towards Python/Django on VPS in general, as it is done on real projects. Thanks for the help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2018-08-21
@sim3x

If you can't find it - create it yourself
Alternatively - use pipenv
Including pulling a wrapper

M
Mr.nobody, 2018-08-21
@no_one

everything, figured out to see the .bashrc command ls -a,
the editor was not installed, installed yum install nano,
opened the nano .bashrc file, inserted
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3. 6 #corrected path
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS=' -p /usr/local/bin/python3.6 '
export PROJECT_HOME=$HOME/Projects
source /usr/local/bin/virtualenvwrapper.sh
reloaded source .bashrc file
worked!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question