Closed jdkleiner closed 11 months ago
This is excellent! I only got to step 4 and kinda shrugged my shoulders after the host of errors!
@jdkleiner Can you start an issue at HSPsquared for this? (or search for an existing one). I think opening the dialog about which required packages need to be fixed version, and which need to be >=. FWIW, this may be limited to our pip
style installs, which is not the norm, as they recommend installing with conda
. The pip
installer that we use was made for linux, though clearly that is not required -- this is detailed here: https://github.com/respec/HSPsquared/issues/55 .
It is super cool to know that we can do it with pip and I think very helpful to us since we can have one path for both linux and windows... but also, the issues you discovered might have real impact for the conda installs as well.
Like, why does it have a fixed version of things like pandas ==1.2.*
, rather than the at least version like with h5py >=3.1
. In fact, I know they've had some issues in the queue that talk about wanting to advance certain packages (like numba
). https://github.com/respec/HSPsquared/issues/100
All this tells me that they may have a very good reason to keep statically linked versions, though if python is suitably robust there seems no reason (to me) that things should change drastically between version necessitating so many packages being anchored to a single package version. It seems like a mixed bag of reasons, that is, some of them may be related to HSP2 development, whereas some, linked in the issue linked above, seem related to problems within pythons numba/numpy ecosystem.
I think 2 things would help:
==
) versus at least (>=
) version in the environment.yml
file.Note: pip commands require a full path to python/pip because I did a non-admin install:
/c/usr/local/bin/python/python -m pip install --upgrade pip --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org
For more convenient use, I can do this at the beginning and then just use pip
and python
without the full path.
PATH="$PATH:/c/usr/local/bin/python"
export PATH
Note: had to totally override PATH because there was an old piece in there from before my profile got wiped when my board went bad:
PATH="/c/usr/local/home/robertwb/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/r/bin:/c/Program Files (x86)/RSA SecurID Token Common:/c/windows/system32:/c/windows:/c/windows/System32/Wbem:/c/windows/System32/WindowsPowerShell/v1.0:/c/windows/System32/OpenSSH:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/usr/bin/vendor_perl:/usr/bin/core_perl:/c/usr/local/bin/python"
export PATH
Finally:
python -m pip install . --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org
@rburghol FYI this issue is outdated, See this issue for optimal method for running HSP2 on windows: https://github.com/HARPgroup/HSPsquared/issues/55
@rburghol Ignore if you've already cracked this yourself, but I've FINALLY figured out how to install and run HSP2 on my local machine. Just ran a test using the latest updated branch
specom
and verified all runs smoothly.Installation process:
PS C:\Users\nrf46657\Desktop\GitHub\HSPsquared
PS C:\Users\nrf46657\Desktop\GitHub\HSPsquared> hsp2 --help
PS C:\Users\nrf46657\Desktop\GitHub\HSPsquared> pip install .
Solution
HSPsquared/HSP2/environment.yml
PS C:\Users\nrf46657\Desktop\GitHub\HSPsquared> pip show pandas
Version: 1.4.2
(see .yml below)environment.yml
to match your local versionsdependencies:
Aligned with Anaconda 2021.05 (May 13, 2021)
package management
pip
Running HSP2
- pandas ==1.2.* # Pandas installs most scientific Python modules, such as Numpy, etc.
- numba ==0.53.1
- numpy ==1.20.* # for compatibility with numba version <0.53
- pytables ==3.6.1
PS C:\Users\nrf46657\Desktop\GitHub\HSPsquared> hsp2 --help
<- this should now show help optionsRun a test
cd tests/testcbp/HSP2results
Previous install steps
Setup Python on Windows
numba
not available on 3.11Set Up HSPsquared on Windows
python -m pip install --upgrade pip pip install --upgrade wheel pip install --upgrade setuptools
close terminal, open again
pip install numba