python - Error when using numpy module in Sublime Text -


i trying set , use numpy on sublime text. however, marks numpy instructions syntax errors.

if type out simple below ,

import numpy np print np.pi,np.e x= np.random.random(10) print(x) 

running file terminal works fine , desired result -

dabbling python python linear-regression.py

3.14159265359 2.71828182846 [ 0.89299598  0.95393114  0.52340898  0.93117159  0.71658433  0.62331653   0.60741025  0.92175348  0.99218785  0.94231719] 

however, on sublime text errors on lines 2 , warnings on other lines.

error - module 'numpy' has no 'pi' member; module 'numpy' has no 'e' member.

i have installed plugin anaconda , pylinter

check python version being called when run script command line , copy path, i.e. which python. edit python.sublime-build file:

{     "shell_cmd": "python -u \"$file\"",     "file_regex": "^[ ]*file \"(...*?)\", line ([0-9]*)",     "selector": "source.python" } 

and replace python on first line path copied.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -