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

import failed for Pants 1.25.0 when global python is not equal to local #511

Open
ThijsBroersen opened this issue Mar 29, 2020 · 2 comments

Comments

@ThijsBroersen
Copy link

After migrating to Pants 1.25.0 (from 1.17.0) the intellij 2019.3 project import failed:

**** Failed to install dotmap-1.2.20 (caused by: NonZeroExit("received exit code 127 during execution of `['/home/name/.pyenv/shims/python3.6', '-s', '-', 'bdist_wheel', '--dist-dir=/tmp/tmp2fdtz_d6']` while trying to execute `['/home/name/.pyenv/shims/python3.6', '-s', '-', 'bdist_wheel', '--dist-dir=/tmp/tmp2fdtz_d6']`",)
)stdout:
stderr:
pyenv: python3.6: command not found
The `python3.6' command exists in these Python versions:
  3.6.10

Pants works fine from a shell, also with other version (e.g. 3.7.7). When using python 3.7.7 the command not found points to python3.7m
My global python version is 3.8.2.
When I set the global python version to 3.6.10 (pyenv global 3.6.10), I can import the project. So it looks like the scope got lost for the current intellij pants plugin icw Pants 1.25.
Also, dotmap-1.2.20 seems a bit old? 2017?

@wisechengyi
Copy link
Collaborator

AFAICT intellij takes the whatever environment variable gets set for terminal on startup. So if you later change the pyenv for a particular terminal, IntelliJ may not recognize that.

Bottom line is that IntelliJ will call Pants on the command line, so this is more about how your environment is set up.

@ThijsBroersen
Copy link
Author

AFAICT intellij takes the whatever environment variable gets set for terminal on startup. So if you later change the pyenv for a particular terminal, IntelliJ may not recognize that.

Bottom line is that IntelliJ will call Pants on the command line, so this is more about how your environment is set up.

It was working. It picks up de correct python version. The project even has a .python-version file. With Pants 1.25.0 something in de plugin works different than with 1.17.0 ...

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