-
Notifications
You must be signed in to change notification settings - Fork 458
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
~Unable to initialize cdktf project in pycharm with venv activated #705
Comments
There may be a conflict between pip and your virtualenv. There are 2 separate templates, perhaps trying the When it comes to manual setup, there's really only a couple steps.
|
But could you check this hardcoded --user parameter in |
I think right now the @cmclaughlin Do you have any thoughts on if it makes sense for the pip version to better support virtual environments? |
I ran into this as well. I couldn't make sense from the docs whether --user is the default or not, but you could detect whether you're in a virtual environment by checking to see if the VIRTUAL_ENV environment variable is set and not specify the --user flag if you are. |
@tl24 that sounds like a reasonable solution. Would you be interested in creating a PR that does just that? |
Sure I can do that |
FYI I ran into an issue trying to test. There is a check in packages/cdktf-cli/bin/cmds/helper/init.ts that won't let you run with version 0.0.0. I'm not sure how one is supposed to test locally with that check. I had to comment it out temporarily. |
You can build the |
Community Note
cdktf & Language Versions
0.3.0
Affected Resource(s)
project initialize
Debug Output
https://gist.github.com/maciak-g/2435e8595ca23c33c374c0c774a857ec
Expected Behavior
Project should be initialized
Actual Behavior
Error message that pip cannot perform --user install.
Steps to Reproduce
Install pycharm, create project with pycharm, initialize venv environment in the project.
Important Factoids
I want to initialize project from the level of pycharm not custom initialization tool and install pip packages within initialized python virtual environment. The second case is I want to add this library to existing project where I have already prepared configuration for objects I will provision to cloud. I am puzzled why there are no alternative instructions to setup project manually or some more options to direct how packages should be installed.
References
The text was updated successfully, but these errors were encountered: