python pip安装未在正确的python版本下安装

python pip安装未在正确的python版本下安装,python,pip,Python,Pip,检查python版本是否正确 workon dal ✭ ✱ (dal)➜ Server (master) 但在安装时,它是在2.7而不是3.4.2下安装的 pyenv versions ✭ ✱ system 2.7 3.2.1 * 3.4.2

检查python版本是否正确

workon dal                                                               ✭ ✱
(dal)➜  Server (master)
但在安装时,它是在2.7而不是3.4.2下安装的

pyenv versions                                                           ✭ ✱
  system
  2.7
  3.2.1
* 3.4.2 (set by /Volumes/dev/Backend/DAL/Server/.python-version)
  venv34
注意路径中的python2.7

我如何告诉pip在3.4.2下安装它

编辑: 例如,我试过了

(dal)➜  Server (master) pip install -r requirements.txt                                          ✭ ✱
Requirement already satisfied (use --upgrade to upgrade): Flask==0.10.1 in /Users/partuck/.virtualenvs/dal/lib/python2.7/site-packages (from -r requirements.txt (line 1))
...
Requirement already satisfied (use --upgrade to upgrade): argparse in /Users/partuck/.virtualenvs/dal/lib/python2.7/site-packages (from stevedore==1.2.0->-r requirements.txt (line 13))
它安装在python主环境下,而不是专门安装在
dal
virtualenv中。 证明: (达尔)➜ 服务器(主)pip3安装✭ ✱

(dal)➜  Server (master) pip3 install itsdangerous
编辑2:

打字时
eval“$(pyenv init-”
正如pyenv指南中推荐的,我看到了
python——版本 Python 3.4.2 但是,当进入pyhton控制台时

Requirement already satisfied (use --upgrade to upgrade): itsdangerous in /usr/local/lib/python3.4/site-packages
Cleaning up...

使用
pip3
而不是
pip
。它似乎是在通用python下安装的,而不是在virtualenv(本例中为dal)中安装的。如果python指向正确的解释器,则在问题正文中写入输出,您可以使用
python-mpipinstall-its
来确保调用属于python解释器的
pip
二进制文件。
(dal)➜  服务器(主服务器)使用哪种python✭ ✱ /Users/partuck/.virtualenvs/dal/bin/python
我如何知道它是哪条python?我想是2.7
 python                                                                ✭ ✱
Python 2.7.9 (default, Dec 19 2014, 06:00:59)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.