Using Wing with pipenv

Index of All Documentation » How-Tos » How-Tos for Specific Environments »


Wing Pro Screenshot

Wing Pro is a Python IDE that can be used to develop, test, and debug Python code running in a Python environment managed by pipenv.

If you do not already have Wing Pro installed, download it now.

This document describes how to configure Wing for pipenv. To get started using Wing as your Python IDE, please refer to the tutorial in Wing's Help menu or read the Quickstart Guide.

Creating a New Pipenv

Wing Pro can create a new pipenv at the same time that you create a new project. To do this, select New Project from the Project menu, choose the source directory to use with your new project, and then press Next.

On the second page you will be able to select Create New Environment and choose pipenv from the menu of available environment types.

Wing uses your selected source directory as the pipenv directory. You can optionally enter the following values:

Packages to Install lets you specify packages to install into the new virtualenv. This is either a space-separated list of pip package specifications, or package management file in one of several formats (requirements.txt, Pipfile, or environment.yaml). Package specifications may be anything accepted by pip, such as a package name, package==version, and package>=version.

Python Executable selects the base Python installation to use. You will need to install pip into this Python installation if not already present. Wing takes care of installing pipenv as needed.

After submitting the New Project dialog, Wing will create the pipenv, set the Python Executable in Project Properties to the command that activates the environment, and add the source directory to the project.

Now source analysis, executing, debugging, and testing in Wing will use the new pipenv, as long as the project you just created is open.

Using an Existing Pipenv

To use an existing pipenv with Wing, simply select the pipenv as your source directory using the Use Existing Directory option in the New Project dialog. Wing will automatically detect that this directory contains a pipenv and use it with your new project.

Working on a Remote Host

Wing Pro can also create a new pipenv on a remote host. This is done the same way as described above, except you first need to choose or create a remote host configuration from the Host menu on the first page of the New Project dialog.

If you are using a pipenv on the remote host, Wing will update the remote host configuration to use the virtualenv created by pipenv (rather than the base Python installation).

Package Management

Once you've configured your project to use pipenv, you can use the Packages tool in the Tools menu to list, add, remove, or update packages. See Package Manager for details.

Related Documents

For more information see: