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

Issues with developer installation with "Failed to build jupyter_contrib_nbextensions" error #1529

Closed
andrewlee94 opened this issue Nov 11, 2024 · 9 comments · Fixed by #1533
Labels
Priority:Normal Normal Priority Issue or PR

Comments

@andrewlee94
Copy link
Member

andrewlee94 commented Nov 11, 2024

(Note from @lbianchi-lbl: I've amended the title following confirmation that the error described in #1529 (comment) also applies to @andrewlee94's original reporting of the issue)

I did a new developer installation of IDAES today on Windows and found a few things that were missing from the installation instructions:

  1. Instructions appear to skip the step of actually installing IDAES. They go from setting up and activating the conda environment to pip install -r requirements-dev.txt which only installs the developer dependencies. When you then try to run idaes get-extension you get an error as IDAES has not been installed yet.
  2. pip install -r requirements-dev.txt installed a new version of Pyomo even though I had a fresh clone of Pyomo already installed. There is a note about this, but it comes after the instruction to run this command.
  3. Pytest was not installed on my machine by default for some reason, so I had to install it separately through conda (after receiving an error when trying to run it the first time).
@lbianchi-lbl
Copy link
Contributor

@andrewlee94 did this happen using a Conda environment? While it's possible to install IDAES without Conda, it's definitely an uphill battle, especially on Windows.

@andrewlee94
Copy link
Member Author

It was not in a conda environment, although I did install Miniconda first.

@dallan-keylogic
Copy link
Contributor

Recall that you should be using Miniforge now. Also, the Pyomo thing is a known issue, and the last time we discussed it the easiest way was just to install from requirements-dev then uninstall that version of Pyomo and reinstall from sources.

As for idaes get-extensions, I haven't had any issues with the developer installation instructions. I can just install from requirements-dev.txt then run it.

@lbianchi-lbl
Copy link
Contributor

Building on what @dallan-keylogic said, I'm fairly confident that (1) and (3) from @andrewlee94's original list can be traced back to environment issues (such as e.g. a mismatch between the python executable and the pip executable causing the dependencies to be installed in a location that the current Python runtime is unable to access) that should not apply with a Conda-based workflow.

@dallan-keylogic
Copy link
Contributor

Actually, I just tried running through things in Windows Sandbox and had issues, so @andrewlee94 is probably on to something (as was likely from the beginning).

pip install requirements-dev.txt failed with the error

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

and I was unable to run idaes get-extensions.

@lbianchi-lbl
Copy link
Contributor

Actually, I just tried running through things in Windows Sandbox and had issues, so @andrewlee94 is probably on to something (as was likely from the beginning).

pip install requirements-dev.txt failed with the error

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

and I was unable to run idaes get-extensions.

@andrewlee94: @dallan-keylogic and I are trying to debug this issue, but I haven't been able to reproduce it yet on the Windows machine I'm using for testing. Can you check if the same error message was shown when you ran the pip install -r requirements-dev.txt?

lbianchi-lbl added a commit to lbianchi-lbl/idaes-pse that referenced this issue Nov 11, 2024
@andrewlee94
Copy link
Member Author

@lbianchi-lbl I did get the same error as Doug but mostly ignored and forgot it as I figured I didn't care too much about notebooks. I did not stop to think it might have been a terminal error that stopped the installation before it finished/

@lbianchi-lbl
Copy link
Contributor

OK, thanks for confirming, it looks like is a genuine issue and I was wrong for summarily chucking it into the "Windows is weird, just use Conda" bin, sorry about that.

If you don't mind, I'll edit the title so that it's more descriptive now that we have a better sense of what's happening.

@lbianchi-lbl lbianchi-lbl changed the title Issues with Installation Instructions Issues with developer installation with "Failed to build jupyter_contrib_nbextension" error Nov 11, 2024
@dallan-keylogic
Copy link
Contributor

@andrewlee94 If you comment out jupyter_contrib_nbextensions in requirements-dev.txt, the installation works fine. It's unclear why that suddenly broke at the moment.

@lbianchi-lbl lbianchi-lbl changed the title Issues with developer installation with "Failed to build jupyter_contrib_nbextension" error Issues with developer installation with "Failed to build jupyter_contrib_nbextensions" error Nov 12, 2024
@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Nov 14, 2024
@ksbeattie ksbeattie linked a pull request Nov 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants