Sonu Chauhan
Sonu Chauhan

Reputation: 7

Anaconda3 and defaualt python conflict in ubuntu 16.04

I installed anaconda and my python script is showing this error even I installed numpy;

Traceback (most recent call last): File "rbm_chords.py", line 3, in import numpy as np File "/home/sonu/anaconda3/envs/my_env/lib/python2.7/site-packages/numpy/init.py", line 146, in from . import add_newdocs File "/home/sonu/anaconda3/envs/my_env/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in from numpy.lib import add_newdoc File "/home/sonu/anaconda3/envs/my_env/lib/python2.7/site-packages/numpy/lib/init.py", line 8, in from .type_check import * File "/home/sonu/anaconda3/envs/my_env/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in import numpy.core.numeric as _nx File "/home/sonu/anaconda3/envs/my_env/lib/python2.7/site-packages/numpy/core/init.py", line 24, in raise ImportError(msg) ImportError: Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. If you're working with a numpy git repo, try git clean -xdf (removes all files not under version control). Otherwise reinstall numpy.

Is there any way to select all the libs of conda in a particular environment. The only suggestion I got after searching over web is to uninstall anyone.My script is working in python 2.7 and working perfectly with the default python.

Upvotes: 0

Views: 1077

Answers (1)

Jimmy
Jimmy

Reputation: 172

It seems like you're using python3 version of Anaconda but the default python for Ubuntu is python2.7

This may help you:

https://www.digitalocean.com/community/tutorials/how-to-install-the-anaconda-python-distribution-on-ubuntu-16-04

Upvotes: 0

Related Questions