|
The answer to you question is divided to two parts: 1. Which python version the native terminal selects for me? 2. How do I specify which python version to use? Which python version the native terminal selects for me? In windows, the default pip that will be used is the one associated with the default python version you use. You can edit it in the PATH environmental variable (Start->find-type "Environmental" and click "Edit system variables"). Look the PATH variable and see which version of python is listed. If both versions are listed, windows will select the first. See more information on system environmental variables here. In Ubuntu/Linux, usually pip is associated with the native legacy version (2.7), pip3 is associated with Python3.5.x and pip3.6 is associated with Python3.6.x. However, if you are using Unix OS (such as Ubuntu) or Mac, it is highly recommended to use virtualenv and activate it. See to see how to use it. It's true for both Python2.7 and Python3.6. In short, you will create a lightweight copy of you python installation without any packages, and, your installed packages will be installed within this virtual environment. Once you activate a virtual environment, the pip is associated with this environment. How do I specify which python version to use? You have multiple choices to specify in which environment you want to install the package. It depends if you are on Windows/Linux/MAC. Shortly, you have the following options: (责任编辑:) |
