Skip to content

[RFC] How to create a virtual environment for rustpython using pipenv? #4171

@ponponon

Description

@ponponon

Chinese version

如何使用 pipenvrustpython 创建虚拟环境?

我一般使用 pipenv 来创建和管理虚拟环境,来分隔不用的 python 解释器和 pip 包管理器。

但是 pipenv 目前似乎无法为 rustpython 创建虚拟环境。

╰─➤  pipenv install --python=/home/bot/opt/python/RustPython/target/release/rustpython
Creating a virtualenv for this project...
Pipfile: /home/bot/Desktop/code/lin/Pipfile
Using /home/bot/opt/python/RustPython/target/release/rustpython (3.10.0) to create virtualenv...
⠸ Creating virtual environment...TypeError: 'NoneType' object is not callable

✘ Failed creating virtual environment 
Failed to create virtual environment.

我的 rustpython 是通过 git clone git@github.com:RustPython/RustPython.git 然后 cargo run --release 获取的。

target/release/rustpython

关于运行平台的版本信息

─➤  lsb_release -a                                                                           
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal

关于 rustpython 的版本信息

─➤  /home/bot/opt/python/RustPython/target/release/rustpython --version                      
RustPython 0.1.2

关于 pipenv 的版本信息

╰─➤  pipenv --version                                                                 
pipenv, version 2022.5.2

English version

How to create a virtual environment for rustpython using pipenv?

I generally use pipenv to create and manage virtual environments, to separate the python interpreter and the pip package manager when I'm not using it.

But pipenv currently doesn't seem to be able to create a virtual environment for rustpython.

╰─➤ pipenv install --python=/home/bot/opt/python/RustPython/target/release/rustpython
Creating a virtualenv for this project...
Pipfile: /home/bot/Desktop/code/lin/Pipfile
Using /home/bot/opt/python/RustPython/target/release/rustpython (3.10.0) to create virtualenv...
⠸ Creating virtual environment...TypeError: 'NoneType' object is not callable

✘ Failed creating virtual environment
Failed to create virtual environment.

My rustpython was fetched by git clone git@github.com:RustPython/RustPython.git and then cargo run --release.

target/release/rustpython

Version information about the running platform

─➤ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

Version information about rustpython

─➤ /home/bot/opt/python/RustPython/target/release/rustpython --version
RustPython 0.1.2

Version information about pipenv

╰─➤ pipenv --version
pipenv, version 2022.5.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRequest for comments

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions