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

Virtual Env on Linux #101

Open
rburghol opened this issue May 23, 2024 · 0 comments
Open

Virtual Env on Linux #101

rburghol opened this issue May 23, 2024 · 0 comments

Comments

@rburghol
Copy link

rburghol commented May 23, 2024

Create Virtual Env for python 3.9 on linux

# install the venv package sitewide
sudo python3.9 -m pip install virtualenv
cd /usr/local/share/
sudo mkdir venv
sudo chgrp allmodelers venv
sudo chmod g+w venv
python3.9 -m virtualenv hsp2dev_py10
chgrp allmodelers hsp2dev_py39/ -Rf
chmod g+w hsp2dev_py39/* -Rf

# now try to install and run hsp2
source /usr/local/share/venv/hsp2dev_py10/bin/activate
cd /opt/model/HSPsquared
sudo chown rob * -Rf # only had to do this due to prior installs done as root
pip3.9 install . # this went smoothly, no errors

# Run
cd ~/working/modeling/hsp2/land_spec/

Run model in venv

cd /opt/model/HSPsquared/
source /usr/local/share/venv/hsp2dev_py10/bin/activate
pip3.9 install .

# then run as per normal
rm PL3_5250_0001.h5
hsp2 import_uci PL3_5250_0001.uci PL3_5250_0001.h5
hsp2 run PL3_5250_0001.h5

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

1 participant