Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

python import error #9

Closed
abaqapuri opened this issue Apr 26, 2016 · 1 comment
Closed

python import error #9

abaqapuri opened this issue Apr 26, 2016 · 1 comment

Comments

@abaqapuri
Copy link

Similar to issue #2 and issue #3. I'm having python importing errors like follows:

th torch2caffe/torch2caffe.lua
ImportError: No module named torch2caffe.lib_py

However, having a init.py file (which is present in the current repo) doesn't prevent these errors, and also it doesn't work to try to import from torch2caffe folder. Messing around with the PYTHONPATH also doesn't help..

If I run python and import it in the following way, all works perfectly:
import torch2caffe.lib_py

But doing that through the lua code gives the import error:
py.import('torch2caffe.lib_py')

@abaqapuri
Copy link
Author

I managed to get it to work by putting "torch2caffe" folder in my python dist-packages. I don't know why it doesn't work if I set my PYTHONPATH to the folder. Perhaps it's an issue with fbpython..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant