- Python 3
- Pip 3
$ brew install python3
Pip3 is installed with Python3
To install virtualenv via pip run:
$ pip3 install virtualenv
Creation of virtualenv:
$ virtualenv -p python3 <desired-path>
Activate the virtualenv:
$ source <desired-path>/bin/activate
Deactivate the virtualenv:
$ deactivate
I was getting this error **
RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3'
AN ERROR OCCURRED
java.lang.IllegalStateException: Creating virtual env exited with 1. Check the logs for more details.
**
I am using MacOS, and python2.7 comes inbuilt. I was facing some issues while installing virtualenv, installed it with pip after some efforts. But now I think the conflict is due to the python versions (2.7 & 3). I do not have Python 3 installed in my system.
So I tried your script @tjt263, but got the below response **
/usr/bin/python
Python 2.7.10
-bash: python2: command not found
-bash: python3: command not found
**
Any idea what could possibly be the issue?