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

environment.sh problems #13

Open
bradbell opened this issue Sep 27, 2024 · 2 comments
Open

environment.sh problems #13

bradbell opened this issue Sep 27, 2024 · 2 comments

Comments

@bradbell
Copy link
Owner

bradbell commented Sep 27, 2024

When I run the following command om MacOS with Homebrew

in/get_package.sh release all

It seems that the install of toml does not really happen and I get the following output:

...
cpp/bin/get_package.sh: autodiff OK
source bin/environment.sh build_type=release
# begin: creatting build/release
pip install toml
pip install pytest
pip install numpy==1.26.4
# end: creatting build/release
python/bin/get_package.py release autograd
Traceback (most recent call last):
  File "/Users/bradbell/repo/cmpad.git/python/bin/get_package.py", line 44, in <module>
    import toml
ModuleNotFoundError: No module named 'toml'

If I then check for toml and then re-install it and then check for toml, I get

cmpad.git>ls build/release/lib/python3.12/site-packages/toml
ls: build/release/lib/python3.12/site-packages/toml: No such file or directory
cmpad.git>source bin/environment.sh
(release) cmpad.git>pip install toml
Collecting toml
  Using cached toml-0.10.2-py2.py3-none-any.whl.metadata (7.1 kB)
Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Installing collected packages: toml
Successfully installed toml-0.10.2
(release) cmpad.git>ls build/release/lib/python3.12/site-packages/toml
__init__.py	decoder.py	ordered.py
__pycache__	encoder.py	tz.py
@utke1
Copy link
Contributor

utke1 commented Sep 27, 2024

In

if ! pip install \$package >& /dev/null

I would remove the redirect to /dev/null. Personally I am pretty much always in favor of showing most command outputs and I am not sure that hiding the output to reduce clutter here outweighs the downside of not seeing what the failure might have been the first time around and why the failure didn't cause an exit from the script

@bradbell
Copy link
Owner Author

I remove the removed the redirect (as suggested above). It turns out that even on linux, pip was not separating the debug and release environments. In addition, it was also seeing another virtual environment that I have my Fedora system.

The following change passes the bin/check_all.sh test on linux:
c73442b

It also fixed the confusion mentioned above on MacOS.

@bradbell bradbell changed the title MacOS with Homebrew environment.sh problems Sep 27, 2024
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