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

Can't install Poetry with python3 interpreter #586

Closed
jtbeach opened this issue Oct 31, 2018 · 2 comments
Closed

Can't install Poetry with python3 interpreter #586

jtbeach opened this issue Oct 31, 2018 · 2 comments

Comments

@jtbeach
Copy link

jtbeach commented Oct 31, 2018

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

In the 0.12.x release series, it seems that the python interpreter that get-poetry.py is run by does not matter -- the poetry entrypoint always assumes that /usr/bin/env/python returns the executable that is activated for Poetry.

I have a Python3 only project, but on Mac OS X, my python executable points at 2.7.x. Python 3.6.x is installed as python3.

Whenever I try to run any poetry command, I get the following error:

[RuntimeError]
The current Python version (2.7.15) is not supported by the project (^3.6)
Please activate a compatible Python version.

I ended up having to hack the following part of the get-poetry script to make sure poetry is invoked with python3:

BIN = """#!/usr/bin/env python
import glob
import sys
import os

lib = os.path.realpath(os.path.join(os.path.dirname(__file__), "..", "lib"))

sys.path.insert(0, lib)

if __name__ == "__main__":
    from poetry.console import main

    main()
"""
@jtbeach jtbeach closed this as completed Oct 31, 2018
@jtbeach
Copy link
Author

jtbeach commented Oct 31, 2018

Dupe of #522

Copy link

github-actions bot commented Mar 3, 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 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant