pytorch / extension-cpp

C++ extensions in PyTorch
1.02k stars 214 forks source link

How to import lltm_cuda if I don't run python setup.py with install option? #24

Closed ypxie closed 6 years ago

goldsborough commented 6 years ago

How else do you want to run python setup.py?

ypxie commented 6 years ago

@goldsborough thanks for your reply. For exampple: python setup.py build_ext --inplace If I run python setup.py install, the package will be installed to the whole python environment, but I want it to be a self contained package that can be import by others.

goldsborough commented 6 years ago

I think this isn't really a question specific to this tutorial or PyTorch, this is a question about how to use setuptools. I just googled setuptools build_ext --inplace and found this Stackoverflow link: https://stackoverflow.com/questions/26574533/python-setup-py-build-ext-inplace. Maybe that helps. Otherwise, please consult the setuptools documentation.

ypxie commented 6 years ago

Thanks!