Reputation: 500
I am trying to use Netbeans 8.1 on OSX 10.9 for my first Python project an got a similar problem as import argparse fails, some setup/path issue?. I get this ImportError when trying to import any libraries:
File ".../hello.py", line 2, in <module>
from flask import Flask
ImportError: No module named flask
The same classic program can be run in command window by python hello.py
or python3 hello.py
.
I added import sys; print "\n".join(sys.path)
command in the beginning of my program to see the path. It shows, that NetBeans 8.1 doesn't follow the platform and path selections from Tools > Python Platforms.
I changed Python 2.7.10 or Python 3.5 as the selected (and default) platform, but the sys.path
is always the same which refers to python2.7. That is always different from the ones defined in Python Path tab. (Restarting IDE did not help.)
I need to change the active path, what can I do?
Upvotes: 0
Views: 290
Reputation: 500
The project platform must be set in Project properties window. The Python Platform Manager settings do not affect to any existing projects!
Upvotes: 0