princeton-vl / lietorch

BSD 3-Clause "New" or "Revised" License
679 stars 50 forks source link

direct installation via pip #5

Closed christian-rauch closed 3 years ago

christian-rauch commented 3 years ago

A useful tip that you may add to the documentation: You can directly clone the repo and install via pip in one step:

sudo -H pip3 install git+https://github.com/princeton-vl/lietorch.git
zachteed commented 3 years ago

Thanks, didn't know pip could do that! Just added to documentation

dennisushi commented 1 year ago

Using sudo uses a different python than the one you might want to use. When I do it, I get ModuleNotFoundError: No module named 'torch', while I do have torch (python3 -c "import torch" succeeds)

christian-rauch commented 1 year ago

tl;dr: If you installed torch without sudo, you also have to install lietorch without sudo.

Using sudo uses a different python than the one you might want to use.

Do you mean a different Python interpreter or a different environment? Where do you have torch installed?

The global system environment is different from the local user environment. If you install torch as local user (under ~/.local/lib/python3.10/site-packages/) and try to use it from a package installed system-wide (under /usr/local/lib/python3.10/dist-packages/) it will not be located. A locally installed package can use a system-wide installed package, but not the other way around.