[SOLVED] Intellij python plugin difference pycharm

Hi,

I did small test python program.

I used IntelliJ IDEA (build #IU-141.1532.4, 18 Jun 2015 00:00) + Python plugin ver:4.5 141.1624 and
PyCharm Community Edition (build #PC-141.1899, 06 Jul 2015 00:00)

Test program

import time
import numpy as np


start = time.time()
print("hello")
time.sleep(0.3)

zeros = np.zeros((1, 10), np.float64)
print(zeros)

end = time.time()
print(end - start)


After I run program I got

/usr/bin/python3 /IdeaProjects/test/test.py
hello
[[ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]]
0.30121850967407227

Process finished with exit code 0

/usr/bin/python3 /PycharmProjects/test/test.py
hello
[[ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]]
0.301145076751709

Process finished with exit code 0


Issue: IntelliJ gave me feedback "No module named numpy" and no auto completion functionality
At PyCharm I set everything the same but it doesn't return any error, auto completion worked and output is basically the same.


Ales

4 comments
Comment actions Permalink

Please try File | Invalidate Caches | Invalidate and Restart.

Remove/add Python interpreter in IDEA. Check idea.log for errors: https://intellij-support.jetbrains.com/entries/23352446 .

0
Comment actions Permalink

I tried twice and now solution.

I found  just one error in idea.log related to python

2015-07-29 12:19:00,343 [ 197097]  ERROR - ij.components.ComponentManager - Not disposed pointer: file:///home/vdemo/.IntelliJIdea14/config/plugins/python/helpers/python-skeletons
-------------Own trace:
com.intellij.openapi.util.TraceableDisposable$DisposalException: Not disposed pointer: file:///home/vdemo/.IntelliJIdea14/config/plugins/python/helpers/python-skeletons
    at com.intellij.openapi.util.TraceableDisposable.throwDisposalError(TraceableDisposable.java:46)
    at com.intellij.openapi.vfs.impl.VirtualFilePointerManagerImpl.a(VirtualFilePointerManagerImpl.java:295)
    at com.intellij.openapi.vfs.impl.VirtualFilePointerManagerImpl.disposeComponent(VirtualFilePointerManagerImpl.java:93)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.disposeComponents(ComponentManagerImpl.java:140)
    at com.intellij.openapi.application.impl.ApplicationImpl.dispose(ApplicationImpl.java:553)

INFO

2015-07-29 12:25:35,177 [   2885]   INFO - llij.ide.plugins.PluginManager - Loaded custom plugins: AngularJS (141.1237), LiveEdit (2.0.15.141), NodeJS (141.1509), PHP (141.1534), Python (4.5 141.1624)
2015-07-29 12:25:35,335 [   3043]   INFO - napi.wm.impl.WindowManagerImpl - jawt failed to load
java.lang.UnsatisfiedLinkError: Native Library /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libjawt.so already loaded in another classloader
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1903)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at com.intellij.openapi.wm.impl.WindowManagerImpl.<clinit>(WindowManagerImpl.java:83)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:428)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:417)

Ales

0
Comment actions Permalink

Make sure you have correct Python interpreter selected in the module settings:

http://i.imgur.com/C0FJ5Ci.png

Also check in Tools | Manage Python Packages that numpy was detected:

http://i.imgur.com/xSlWZ0m.png

0
Comment actions Permalink

Project Settings | Modules | Dependencies | Module SDK was not set properly

Thank you

0

Please sign in to leave a comment.