1

Above Error comes only when i am trying to run the script : "rgarg:pytutorial raghav$ python tflearn11.py"

It working fine in Rodeo IDE, also if I put "import tflearn " in command line python interpreter it works fine (even I typed full script in command line , it worked fine w/o import issue) .

My packages are in same location as i have given in my bash (Mac OS El Captain)

export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages

A similar problem i found Link but not getting how can i remove path(0) when running from python interpreter.

Thanks

Community
  • 1
  • 1
Raghav Garg
  • 33
  • 2
  • 7
  • Why aren't you developing this inside a virtual environment? – Two-Bit Alchemist Aug 23 '16 at 20:30
  • @Two-BitAlchemist : may be i can use later on but i am just now in nascent stage of learning , I don't understand what i am doing wrong, script works fine on RODEO , It work fine when I put everything on command line python interpreter , but just simply doesn't work while i run using : python script.py can you please help what i am missing.Thanks in advance. – Raghav Garg Aug 24 '16 at 05:37
  • Virtual environments make it **easier** to manage dependencies without breaking your system. They are not something to be avoided at any stage of learning and they are not hard. If you install this in a virtual environment, your path will be managed automatically and this problem will likely evaporate with no chance of you breaking your system. Instead, you're trying to solve it manually in a way that could render some systems inoperable if you do it wrong -- **not** the beginner-friendly approach! – Two-Bit Alchemist Aug 24 '16 at 11:41
  • @Two-BitAlchemist , Thanks , it worked finally in virtual environment . But one thing i will mention that we should use sudo easy_install virtualenv (then only it will create exec file in usr/local/bin) , if we use pip install virtualenv it will not work. Thanks – Raghav Garg Aug 24 '16 at 17:01

1 Answers1

1

As @Two-Bit mentioned i used virtualenvs Link.

But please make sure use below for installation of virtualenvs

$ sudo easy_install virtualenvs

instead of pip install virtualenvs.

Raghav Garg
  • 33
  • 2
  • 7