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

How to specifiy python version for virtualenv besides the default #2059

Closed
codeman101 opened this issue Feb 19, 2020 · 3 comments
Closed

How to specifiy python version for virtualenv besides the default #2059

codeman101 opened this issue Feb 19, 2020 · 3 comments
Labels
area/docs Documentation issues/improvements

Comments

@codeman101
Copy link

codeman101 commented Feb 19, 2020

  • [x ] I have searched the issues of this repo and believe that this is not a duplicate.

I'm trying to install a dependency which is forcing python 3.6 (via ~3.6) and my default is python 3.7.5. I installed python 3.6.0 and I tried editing the toml file of my project where the python requirement is specified to be ~3.6. When that didn't work I tried rerunning poetry init and when I got to the python version prompt I wrote ~3.6. Still the dependency failed to install and I couldn't find anything in the docs on how to resolve this (or here in the issues when I searched "specific python vitrualenv"

Does the need to use a specific python version force me to have manually create the virtualenv before running poetry init? I was under the impression that it's possible to do something like poetry init --use python3.6(or the path to it though I hope not for cross compatibility sake (Windows/*nix) but I don't see any docs on that kind of command.

@codeman101 codeman101 added the area/docs Documentation issues/improvements label Feb 19, 2020
@graphman65
Copy link

graphman65 commented Mar 3, 2020

The version of python used by the virtualenv can be set using:
poetry env use <python-version/path-to-python> (eg. poetry env use 3.7)

Check #731 for more details.

@finswimmer
Copy link
Member

This is described here as well.

Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements
Projects
None yet
Development

No branches or pull requests

3 participants