英特尔Python发行版上的pipenv环境

时间:2018-10-09 15:33:20

标签: python pipenv

我试图在我的Python应用程序中利用MKL(英特尔数学内核库),该应用程序使用pipenv进行程序包管理和虚拟环境。

我已安装英特尔的Python发行版:

$ /opt/intel/intelpython3/bin/python --version
Python 3.6.5 :: Intel Corporation

现在我正尝试使用此Python发行版安装新的pipenv环境:

/home/.../test4 $ which pipenv
/home/.../.local/bin/pipenv

/home/.../test4 $ pipenv install --python=/opt/intel/intelpython3/bin/python
Creating a virtualenv for this project...
Pipfile: /home/.../test4/Pipfile
Using /opt/intel/intelpython3/bin/python (3.6.5) to create virtualenv...
⠋Running virtualenv with interpreter /opt/intel/intelpython3/bin/python
Using base prefix '/opt/intel/intelpython3'
New python executable in /home/.../.local/share/virtualenvs/test4-qDBSlh47/bin/python
Installing setuptools, pip, wheel...done.
Setting project for test4-qDBSlh47 to /home/.../test4

Virtualenv location: /home/.../.local/share/virtualenvs/test4-qDBSlh47
Creating a Pipfile for this project...
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Updated Pipfile.lock (ca72e7)!
Installing dependencies from Pipfile.lock (ca72e7)...
     ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

/home/.../test4 $ pipenv run python --version
Python 3.6.6

如您所见,此pipenv环境中的python版本不是用来创建带有pipenv参数的--python的版本。

应为Python 3.6.5 :: Intel Corporation,但应为Python 3.6.6

Python 3.6.6是我的系统python3.6

$ python3.6 --version
Python 3.6.6
$ which python3.6
/usr/bin/python3.6

所以问题是为什么pipenv的--python参数不会驱动将python可执行文件复制到虚拟环境中。如果那不是在虚拟环境中设置python可执行文件的方法,那是什么?

编辑:
生成的Pipfile:

$ vi Pipfile

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.6"

0 个答案:

没有答案