Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulumi new for Python should create and activate virtual environment #2201

Closed
Tracked by #11598
swgillespie opened this issue Nov 14, 2018 · 4 comments
Closed
Tracked by #11598
Assignees
Milestone

Comments

@swgillespie
Copy link
Contributor

Today, instantiating a Python template using pulumi new installs the Pulumi package and dependencies outside of a virtual environment, which is fraught with peril and outside of what users will expect if they intend to use virtual environments. We should consider creating a virtual environment for users when running pulumi new.

We should decide whether or not we should push pipenv on people or if we should just use virtualenv for this. Either way, we should be installing packages into a virtual environment.

@swgillespie swgillespie added this to the 0.19 milestone Nov 14, 2018
@swgillespie swgillespie self-assigned this Nov 14, 2018
@lukehoban
Copy link
Member

I think we'll need two things here:

  1. Short term - make sure that pulumi new works for Python. That may mean skipping auto-update for Python templates and printing out instructions for what to do manually.
  2. Make end-to-end smooth but automatically creating virtualenv and installing dependencies so that we can go all the way to update succesfully.

@lukehoban lukehoban added the p1 Bugs severe enough to be the next item assigned to an engineer label Nov 15, 2018
@swgillespie
Copy link
Contributor Author

Agreed. I will shoot for 1) ASAP.

@swgillespie swgillespie modified the milestones: 0.19, 0.20 Nov 21, 2018
@swgillespie swgillespie removed the p1 Bugs severe enough to be the next item assigned to an engineer label Nov 21, 2018
@swgillespie
Copy link
Contributor Author

The M19 component of this bug is done, moving the rest out to M20 (creating and activating a virtual environment).

@swgillespie swgillespie modified the milestones: 0.20, 0.21 Jan 14, 2019
@swgillespie
Copy link
Contributor Author

Since we're not a shell, I don't believe it's particularly useful to activate a virtual environment from the CLI since a user will have to source it again anyway. If there's any demand for this feature, we can re-open this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants