Skip to main content



      Home
Home » Newcomers » Newcomers » OS X 10.12 // Eclipse 4.7 // Python 3.6(Cannot get simple print() to work within Eclipse)
OS X 10.12 // Eclipse 4.7 // Python 3.6 [message #1767684] Sun, 09 July 2017 14:47 Go to next message
Eclipse UserFriend
Downloaded and installed Eclipse 4.7 for PHP, though I only need python but didn't see it as an option.

1st Q) Is there a direct eclipse python installer?

via both python.org and via homebrew have python3.6 in
/Library/Frameworks/Python.framework/Versions

As you know, OS X has its frameworks in the /System/Library path.

-- -- --
The basics to use python3 w/o Eclipse works: Both IDLE and on the command line.

Terminal: idle AND Terminal: python <-- both bring up python 2.7
Terminal: idle3 AND Terminal: python3 <-- both bring up python 3.6

As an aside, I was amazed that as root I could not make a symbolic link from the python 3.6 version in /Library into /usr/bin. ????????
But that's a side wonder. If you have a non-corrupting solution I'd be interested to know.

BACK to Eclipse:

In first attempt I think I did drag an old version of pydev onto eclipse, but since then I have removed eclipse and its workspace and reinstalled, and dropped the latest version on.

2nd Q) How can I tell what version of pydev I now have?

On earlier seeing IDLE's warning, I installed Tcl/Tk 8.6.4 BEFORE Eclipse and python, but IDLE is still telling me:
>>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.

3rd Q) In what sequence should I install Tcl/Tk?

Next, within Eclipse, Preferences, PyDev, Interpreters, Python Interpreter,
I added and moved to top, the path to the /Library framework for python3, so it looks like image1.
index.php/fa/29904/0/

FINALLY, obviously ignorantly, I thought I was ready to go.
NOT!

In image2 you'll see my layout, the console, and my complicated (sic) program.
index.php/fa/29906/0/

THE Q) How can I get this to work?!

THANK YOU ALL!!!
  • Attachment: image1.gif
    (Size: 60.18KB, Downloaded 943 times)
  • Attachment: image2.gif
    (Size: 79.82KB, Downloaded 1436 times)

[Updated on: Sun, 09 July 2017 15:53] by Moderator

Re: OS X 10.12 // Eclipse 4.7 // Python 3.6 [message #1768126 is a reply to message #1767684] Thu, 13 July 2017 15:17 Go to previous message
Eclipse UserFriend
I'm guessing your interpreter is set to python 2 and is choking on your python 3 lib as your error seems to indicate. Remove python 3 lib from the dependency and try it. If you need to use python 3, configure the interpreter for python 3 and remove the python 2 libraries.

Anaconda2 or Anaconda3 are the best complete python packages out there. Try them out. I've seen that Mac users are having more configuration problems with the libraries python uses. The advantage to juptyer notebook is that conda sets your environment for you so you don't have to do all this manually. Try that out and see if it makes it easier.
Eclipse is really for best practice for application management. You can certainly develop small apps in eclipse, but its real power is employed in rcp apps and plugin development and the management of the plugins.

So I would learn how to code on jupyter anaconda and when you're ready to take the next step, read an eclipse rcp app tutorial and call your python script through it. Then you will have a managed plugin that is extensible and managed for future users.

[Updated on: Tue, 18 July 2017 09:29] by Moderator

Previous Topic:How i can i get the build target back?
Next Topic:IDE Install
Goto Forum:
  


Current Time: Mon Mar 24 23:39:06 EDT 2025

Powered by FUDForum. Page generated in 0.27882 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top