SimVascular / svZeroDSolver-Archived

A Python lumped-parameter solver for blood flow and pressure in hemodynamic networks
Other
12 stars 15 forks source link

Not able to install svzerodsolver Python package #34

Closed JonathanPham closed 3 years ago

JonathanPham commented 3 years ago

I tried the instructions on the README.md to install the svzerodsolver Python package, but the command, python setup.py install --record files.txt, does not work for me. Note that I added the extra --record files.txt so that I could uninstall this package in the future if I need to (see reference here).

This is the entire output that I got:

jonathanpham@marsdenlab-OptiPlex-7060:~/Documents/software/svZeroDSolver/svZeroDSolver$ python setup.py install --record files.txt
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/svzerodsolver
copying svzerodsolver/connections.py -> build/lib/svzerodsolver
copying svzerodsolver/solver.py -> build/lib/svzerodsolver
copying svzerodsolver/utils.py -> build/lib/svzerodsolver
copying svzerodsolver/__init__.py -> build/lib/svzerodsolver
copying svzerodsolver/time_integration.py -> build/lib/svzerodsolver
copying svzerodsolver/blocks.py -> build/lib/svzerodsolver
copying svzerodsolver/use_steady_bcs.py -> build/lib/svzerodsolver
running install_lib
creating /usr/local/lib/python3.8/dist-packages/svzerodsolver
error: could not create '/usr/local/lib/python3.8/dist-packages/svzerodsolver': Permission denied

@ktbolt Any recommendations on how to address this issue?

JonathanPham commented 3 years ago

Also, one more question. If I install svzerodsolver as a Python package, then would I have to uninstall it and reinstall it (if there are updates to this svZeroDSolver repo) in the future?

ktbolt commented 3 years ago

@JonathanPham The Permission denied error is because you need to be root to install into /usr/local/lib/python3.8/, just use sudo python setup.py install.

In future I will setup things to use pip.

mrp089 commented 3 years ago

@JonathanPham Alternatively, you can also run python setup.py install --user. See https://docs.python.org/3/install/