0

So i wanted to use the Quandl package to learn some data processing. I installed Quandl in the pycharm package, and it worked out pretty well.

import  Quandl, math

and then, i use the Quandl to get some data from the internet

data = Quandl.get('some form of data')

But then when i tried to run the python script

bash-3.2$ python Regression.py
Traceback (most recent call last):
  File "Regression.py", line 2, in <module>
    import  Quandl, math
ImportError: No module named Quandl

In my Pycharm interpreter, i have 4 different types:

-2.7.11 (/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/python2.7) I installed Quandl here

-3.5.1 (/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/bin/python3.5) I also installed it here

-2.6.9 (/System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6) It has an error to install packaging tools

-/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 Permission denied for installing

When i tried to import Quandl in the terminal through python shell, i also retired an error

Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Quandl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named Quandl

I also tried the same thing for Simple CV, it also says that it's not in the module, even though I've already installed it both in 3.5 and 2.7.

from SimpleCV import Camera

cam = Camera()

while True:

    img = cam.getImage()

    img = img.binarize()

    img.drawText("Hello World")

    img.show()


bash-3.2$ python simplecv.py
Traceback (most recent call last):
  File "simplecv.py", line 1, in <module>
    from SimpleCV import Camera
ImportError: No module named SimpleCV

For installing 'pip', i also had an error installing it in the Pycharm terminal. I've already asked a question about it Installing pip in Pycharm 2016.3

Imperator123
  • 599
  • 2
  • 11
  • 25
  • If you run your script with the full path of one python that has Quandl installed what is the result? For example: `/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/python2.7 Regression.py` – Giordano Dec 14 '16 at 19:43
  • i got a bash: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/‌​Versions/2.7/bin/pyt‌​hon2.7: No such file or directory – Imperator123 Dec 17 '16 at 19:35

2 Answers2

0

Try to install it using pip2.7. I suspect that you are trying to execute the script with python3 (python command), however, your python interpreter in pyCharm is python2.7.

If you keep getting errors I suggest you to research a bit about virtualenvs, as it can help you had your several dependencies and interpreters easly organized by proyect. (PyCharm has support for virtualenvs)

0

When you invoke "python" in your console it launches the default Python interpreter (in your case Python 2.7.10). Looks like in PyCharm you selected different interpreter and installed packages on it. Make sure you use the same interpreter in PyCharm (Settings | Project | Project interpreter)

DmitryFilippov
  • 456
  • 4
  • 3