Python venv and virtualenvwrapper merged

Python 3.5 recommends creating virtual environments using venv rather than virtualenv . However, both tools are mentioned in the Python packaging guide.

However, virtualenvwrapper is the recommended wrapper tool to use when using virtualenv.

My questions then:

  1. Is there any way to use virtualenvwrapper with venv?
  2. Or can one even assume that virtualenvwrapper is not needed because of venv? (I can't figure out how this could be true, since this is a wrapper that solves another problem)

Edit: I see that there is some confusion in the answers to my question. Venv is the official Python equivalent for virtualenv, as explained in the links above. Numerous questions suggest that venv should be used. As mentioned in the "duplicate", you suggested:

the introduction of venv is partly a response to this mess. If you want to help improve the situation, I suggest you use venv and encourage others to do the same.

Therefore, it is recommended to use venv. But, as follows from this question, if someone uses venv, how does he use a shell like virtualenvwrapper

+11
source share
3 answers

.bashrc/.bash_profile/.zshrc, venv.

, , , venv.

lsvenv(){
    ls $VENV_HOME
}
+3

[EDIT, 8 19: , , , Python. , conda, " ".]

  1. , virtualenvwrapper virtualenv, . , - venv.

  2. venv , . , venv venv API, .

Python. , , anaconda pip .

Python, venv Python 3.5 virtualenv virtualenvwrapper, .

venv - , , , virtualenv , virtualenvwrapper. .

+1
  1. virtualenvwrapper venv?

. WORKON_HOME venvs. ~/.zshrc, virtualenv ( , py2) venv ( ). .venvs, , Python 3, virtualenvs.

# Python Environment Handling
export WORKON_HOME=$HOME/.venvs  # Because I am using python3 -m venv (aka pyvenv)
export PROJECT_HOME=$HOME/dev
source /usr/local/bin/virtualenvwrapper.sh  # symlinked to /Library/Frameworks/Python.framework/Versions/3.7/bin/virtualenvwrapper.sh
  1. , virtualenvwrapper - venv? ( , , , )

venv == virtualenv (). Venv virtualenvwrapper , virtualenv. .

  1. , , ?

, , , , virtualenvwrapper zsh virtualenv virtualenvwrapper , .

workon venvs , workon speech_analyzer .

  1. ?

venvs , , , , , , pipenv. Pipenv , , .

, : https://chriswarrick.com/blog/2018/07/17/pipenv-promises-a-lot-delivers-very-little/. , : : https://chriswarrick.com/blog/2018/07/17/pipenv-promises-a-lot-delivers-very-little/#nikola

20 . Pipenv . Pipenv 20 20 . , pipenv , . , , , pipenv.

0

Source: https://habr.com/ru/post/1684258/


All Articles