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

Unable to install development version on MacOS due to requirements #99

Closed
olivecha opened this issue Jul 29, 2024 · 4 comments
Closed
Assignees

Comments

@olivecha
Copy link

I tried installing the repository requirements using both pip and conda, and I run into troubles with both (see error logs).

I was able to install the development version by removing the specific package version requirements from the requirement.txt file.
The only conflict was to use numpy<2.0, this could either be added to the requirement.txt file, or the project could be made compatible with the latest numpy version (preferable). It seems only a single method is deprecated in numpy 2.0, from running the tests:

AttributeError: `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead.. Did you mean: 'strings'?

conda_error_log.txt
pip_error_log.txt

@mdmeeker
Copy link
Collaborator

mdmeeker commented Aug 2, 2024

This is really an issue with Tensorboard dependency rather than with DRDMannTurb itself; see the below.
Numpy 2.0 API compatibility issue #6869
Update usage of numpy to reflect numpy 2.0 changes #6871

This has been merged and is on their nightly builds, so I believe all will be well with the next release.

Is it fine to temporarily fix numpy<2.0?

@olivecha
Copy link
Author

olivecha commented Aug 3, 2024

Yes that would be fine, also the drdmanturb from the pre-compiled wheel does not pass tests at the moment due to changes in the numpy API, so you could temporarily add numpy<2.0 in setup.py, then eventually replace it with a minimal Tensorboard version.

Also, you could specify in the development installation instructions that re-creating the exact conda environment is not mandatory (if not possible), and that you can just run pip install -e . to use the development version, and dependencies will be resolved based on "install requires" in setup.py.

@mdmeeker mdmeeker mentioned this issue Aug 4, 2024
@mdmeeker
Copy link
Collaborator

mdmeeker commented Aug 4, 2024

I can redo the wheels once things are more or less finalized.

#103 pins numpy<2.0 in setup.py.

I should have caught this sooner, but our instructions in README were misleading -- the conda spec-file.txt was for Linux64 and therefore doesn't work on macOS (I myself am on an M2), but I didn't really see any clear indication that this was the issue in the error logs conda gave me (which, on my end, were about identical to what you provided in the OP) nor did we indicate that this would be an issue in the instructions. Just "unexpected error occurred".

I have included a more general environment.yml and moved all Conda environment exports under conda_env_files. I haven't had issue recreating environments off of these; let me know if they work for you.

(As a sidenote, I am getting notifications about security risks with our dependencies from Dependabot; these are immediately resolved by bumping the versions up with the many PRs it has open currently. I will merge those before redoing the wheel so that tests pass)

@olivecha
Copy link
Author

olivecha commented Aug 6, 2024

The environment.yml worked for me. I'll close the issue as the pull request was ready to be merged.

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