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

Add installation troubleshooting #379

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ElliottKasoar
Copy link
Member

Resolves #373

@ElliottKasoar ElliottKasoar added the documentation Improvements or additions to documentation label Jan 13, 2025
@ElliottKasoar ElliottKasoar self-assigned this Jan 13, 2025
@ElliottKasoar ElliottKasoar marked this pull request as ready for review January 13, 2025 11:29
Copy link
Collaborator

@oerc0122 oerc0122 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this should be here.


"GNU"

version 4.8.5.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we really concerned about trying to compile with a 10 year old release of GCC? This is not our failure and should probably be on phonopy's docs, not ours.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I say in the issue, I agree to a large extent it is an issue for phonopy, but it occurs when running pip install janus-core, and for the user who encountered this, it wasn't obvious how to resolve it, so I don't think it hurts to have this.

The solution is generally very simple, but if you're not used to cmake/compilation, which I imagine is true for a lot of Python users, it may not be immediately obvious, as it's not something you often need to worry about.

Also just to note, there are two similar issues, which I've tried to cover together, although maybe I shouldn't:

  1. Old GCC etc. In this case, it was the default for the user on their HPC system, which I don't think will be uncommon, unfortunately.
  2. CXX being unset. This happened to me at one point when I changed environments, and it took me a minute to understand why installing had stopped working, when it had been fine up to then

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the scope of PR-ing this into phonopy's docs on their "installing phonopy" page and just linking it/directing them there.

I have no idea how responsive phonopy are to PRs, but this seems a fairly simple thing.

https://phonopy.github.io/phonopy/install.html#building-using-pip-install

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general are responsive

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the scope of PR-ing this into phonopy's docs on their "installing phonopy" page and just linking it/directing them there.

I have no idea how responsive phonopy are to PRs, but this seems a fairly simple thing.

https://phonopy.github.io/phonopy/install.html#building-using-pip-install

I did wonder that. I think part of my concern is that a user doesn't necessarily immediately assume phonopy is at fault - I don't think the user who encountered the error did.

It's obvious in retrospect, but if you're somewhat used to battling dependency issues etc, your first thought may well be to blame us.

I'd also argue that we want to be relatively clear what requirements there are for installing janus-core, without needing to dive into the details of every sub-dependency. Clearly there are limits, but for a slightly unusual issue with a relatively simple solution, I'm not entirely convinced it's out of scope.

I'll open an issue with phonopy too either way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a known thing: phonopy/phonopy#439

Maybe a different way to look at the problem is that the CMake error does more or less describe what you need to do in either case (update your compiler or make sure it's set). If you're installing phonopy directly, this sort of error is relatively expected, since they describe the need for a compiler, and so in that context, I'm not sure they need to elaborate much on the issue.

When installing janus-core, on the other hand, it's not something a user naturally expects in the same way, and without that context I don't think the solution is as clear.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to build phonopy
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (phonopy)

Seems fairly indicative if you're aware of phonopy it's not our problem. Then again, I'm not 100% sure people know what is happening when they pip install.

I'm fine with it going in in principle, but I do wonder whether we (instead of explaining it) link against that issue? Maybe that's worse. I trust your judgement.

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

Successfully merging this pull request may close these issues.

Document phonopy cmake error troubleshooting
3 participants