Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

move python module from exising environment to anaconda

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.)

like image 665
Unknownpgr Avatar asked Dec 08 '25 17:12

Unknownpgr


1 Answers

I guess while installing you did not activate your anaconda environment. Repeat the steps after activating your anaconda environment.

like image 164
Saurav Panda Avatar answered Dec 11 '25 07:12

Saurav Panda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!