Reputation: 87
I want to use 'openface' module on python 3, anaconda. so I referred to here.
https://github.com/samotiian/Installing_openface_with_anaconda
I don't know why, but it seems that the modules were installed on my existing python,not anaconda environment.
when I import these modules from python(not anaconda environment), it works well.
unknownpgr@unknownpgr:~$ python
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:09:58)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn
>>> import openface
>>>
But It gives such errors when imported from anaconda environment.
(opencv) unknownpgr@unknownpgr:~$ python
Python 3.6.3 | packaged by conda-forge | (default, Nov 4 2017, 10:10:56)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import openface
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'openface'
>>> import sklearn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'sklearn'
>>>
So my question is : I how can I move these modules from existing environment to anaconda?
(I'm sorry that I'm not good at English. But maybe you can understand what I want to say.)
After some reinstall, I found that the problem was working directory. I was working on /home/openface, so I moved 'openface' to ~/anaconda3/envs/myenvironmet/ and It worked well.
(I'm new to linux and python programming, so I don't know why. Please let me know if you know why python module importing is directory depended to directory.)
Upvotes: 3
Views: 2118
Reputation: 16
Just copy the package folder from the
PYTHONHOME/lib/site-packages
to
ANACONDAHOME/lib/site-packages
Should work. Worked for me.
Upvotes: 0
Reputation: 566
I guess while installing you did not activate your anaconda environment. Repeat the steps after activating your anaconda environment.
Upvotes: 2