Speed up ReplicatorG/Skeinforge slicing by 4x with PyPy (Mac OS X instructions)

3,603 views
Skip to first unread message

Jon Daniels

unread,
Nov 9, 2012, 12:53:06 PM11/9/12
to make...@googlegroups.com
When I saw Dan mention using PyPy to speed up Skeinforge slicing, I just had to try it.

PyPy is an alternative python implementation that has a JIT compiler so it runs python much faster.

Installing and using pypy for Skeinforge is not straight forward.  If you don't use the correct software packages you run into a bunch of bugs and can't use PyPy.  However, if you follow my instructions, it's easy to setup and takes less than 5 minutes.

The result is two to five times faster Gcode generation in ReplicatorG when using Skeinforge.

If you run into any issues, you can easily switch back to the standard python interpreter at any time.


Here are my instructions for Mac OS X 10.7.  I believe it will work for 10.6 and 10.8 too.

1) In a *new* Terminal window, run the following commands.  You should be in your home directory ('cd').  If you prefer, you can copy and paste all of them at once.  Just watch for any errors.

bunzip2 pypy-c-jit-latest-osx64.tar.bz2
tar -xf pypy-c-jit-latest-osx64.tar
cd pypy-c-jit-*-osx64
./bin/pypy ez_setup.py 
unzip tkinter-pypy-0.1-for-8.5.zip
cd tkinter-pypy-0.1-for-8.5
../bin/pypy ./setup.py install

2) In ReplicatorG go to the ReplicatorG Menu -> Preferences -> Advanced -> Select Python Interpretor...  

3) Select the 'bin/pypy' file.  It will be inside a folder named something like pypy-c-jit-58765-034868cf23c4-osx64.
For example mine is: jond -> pypy-c-jit-58765-034868cf23c4-osx64 -> bin -> pypy.

4) Slice fast!   No need to restart ReplicatorG.

I suggest you time a slice before and after so you can be amazed by the speedup too. :)

If in doubt as to which interpreter RepG is using, you can verify by running this command while RepG is generating gcode:

ps auxw | grep py | grep -v conveyor | grep -v grep

The first line of the result will either contain something like 'pypy-c-jit-58765-034868cf23c4-osx64/bin/pypy' which means RepG is using PyPy, or '/usr/bin/python' which means RepG is python.  Of course, you'll probably notice the progress bar is moving way faster when slicing, which may be all the verification you need.

Cheers.

Bottleworks

unread,
Nov 11, 2012, 9:54:28 PM11/11/12
to make...@googlegroups.com
I'm getting an error when running the last step.  I get:

$ ../bin/pypy ./setup.py install
running install
running bdist_egg
running egg_info
writing tkinter_pypy.egg-info/PKG-INFO
writing top-level names to tkinter_pypy.egg-info/top_level.txt
writing dependency_links to tkinter_pypy.egg-info/dependency_links.txt
reading manifest file 'tkinter_pypy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'tkinter_pypy.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.8-x86_64/egg
running install_lib
running build_ext
building '_tkinter' extension
creating build/temp.macosx-10.8-x86_64-2.7
creating build/temp.macosx-10.8-x86_64-2.7/src
cc -arch x86_64 -fPIC -Wimplicit -DWITH_APPINIT -I/usr/include/tcl -I/usr/include/tk -I/Users/bradley/pypy-c-jit-58765-034868cf23c4-osx64/include -c src/_tkinter.c -o build/temp.macosx-10.8-x86_64-2.7/src/_tkinter.o
unable to execute cc: No such file or directory
error: command 'cc' failed with exit status 1

Dan Newman

unread,
Nov 11, 2012, 9:59:35 PM11/11/12
to make...@googlegroups.com

On 11 Nov 2012 , at 6:54 PM, Bottleworks wrote:

> I'm getting an error when running the last step. I get:
>
> $ ../bin/pypy ./setup.py install
> running install
> running bdist_egg
> running egg_info
> writing tkinter_pypy.egg-info/PKG-INFO
> writing top-level names to tkinter_pypy.egg-info/top_level.txt
> writing dependency_links to tkinter_pypy.egg-info/dependency_links.txt
> reading manifest file 'tkinter_pypy.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> writing manifest file 'tkinter_pypy.egg-info/SOURCES.txt'
> installing library code to build/bdist.macosx-10.8-x86_64/egg
> running install_lib
> running build_ext
> building '_tkinter' extension
> creating build/temp.macosx-10.8-x86_64-2.7
> creating build/temp.macosx-10.8-x86_64-2.7/src
> cc -arch x86_64 -fPIC -Wimplicit -DWITH_APPINIT -I/usr/include/tcl
> -I/usr/include/tk
> -I/Users/bradley/pypy-c-jit-58765-034868cf23c4-osx64/include -c
> src/_tkinter.c -o build/temp.macosx-10.8-x86_64-2.7/src/_tkinter.o
> unable to execute cc: No such file or directory
> error: command 'cc' failed with exit status 1

You do not have a C compiler installed. That stage of the build wants one. Used to be
that Mac install DVDs include the XCode toolkit but I don't think that's the case anymore.
You can download it from Apple, https://developer.apple.com/technologies/tools/, but it's
a big download as it includes a lot more than just a C compiler. Jon may have an
alternate suggestion.

Dan

Bottleworks

unread,
Nov 11, 2012, 10:17:45 PM11/11/12
to make...@googlegroups.com
I have xCode installed...I used to have everything installed.  I wonder if the update to 10.8 wiped some of it?  Stand by...

JohnA.

unread,
Nov 11, 2012, 10:19:03 PM11/11/12
to make...@googlegroups.com
I know people found that PyPy was creating different skeinforge toolpaths versus regular python - is that still the case, and does it matter?

JohnA.



On Sunday, November 11, 2012 9:59:28 PM UTC-5, dnewman wrote:

Dan Newman

unread,
Nov 11, 2012, 10:34:13 PM11/11/12
to make...@googlegroups.com

On 11 Nov 2012 , at 7:19 PM, JohnA. wrote:

> I know people found that PyPy was creating different skeinforge toolpaths
> versus regular python - is that still the case, and does it matter?

It used to at some point owing to a difference in how it played out hash table
entries (python dictionaries). But that seems to be a thing of the past, at
least with the pypy I've been using. I did some comparisons of a number of
builds and couldn't find any differences at all (diff'd the gcodes).

Dan

Bottleworks

unread,
Nov 11, 2012, 10:56:47 PM11/11/12
to make...@googlegroups.com
So, the update to 10.8 apparently wipes a fair it.  It killed the CLTs, and both iOS simulator packages.  Odd.  But, I still have errors - just different.  I need x windows too?


$ ../bin/pypy ./setup.py install
running install
running bdist_egg
running egg_info
writing tkinter_pypy.egg-info/PKG-INFO
writing top-level names to tkinter_pypy.egg-info/top_level.txt
writing dependency_links to tkinter_pypy.egg-info/dependency_links.txt
reading manifest file 'tkinter_pypy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'tkinter_pypy.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.8-x86_64/egg
running install_lib
running build_ext
building '_tkinter' extension
cc -arch x86_64 -fPIC -Wimplicit -DWITH_APPINIT -I/usr/include/tcl -I/usr/include/tk -I/Users/bradley/pypy-c-jit-58765-034868cf23c4-osx64/include -c src/_tkinter.c -o build/temp.macosx-10.8-x86_64-2.7/src/_tkinter.o
In file included from src/_tkinter.c:75:
/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
#       include <X11/Xlib.h>
                ^
1 error generated.

error: command 'cc' failed with exit status 1










JohnA.

unread,
Nov 11, 2012, 11:13:11 PM11/11/12
to make...@googlegroups.com
And after you install X11 you'll need to create a link:

ln -s /opt/X11/include/X11 /usr/local/include/X11
Otherwise it won't find it correctly.

JohnA.

Dan Newman

unread,
Nov 11, 2012, 11:19:02 PM11/11/12
to make...@googlegroups.com

On 11 Nov 2012 , at 7:56 PM, Bottleworks wrote:

> So, the update to 10.8 apparently wipes a fair it. It killed the CLTs, and
> both iOS simulator packages. Odd. But, I still have errors - just
> different. I need x windows too?

BTW, you may be able to get by with the pre-built pypy. (I seem to.)
On OS X 10.7.5, I'm using the one from

https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-osx64.tar.bz2

However, the procedure Jon posted is more general and as such likely to give better
results provided you have the prerequisites in place.

Dan

Gerald Orban

unread,
Nov 11, 2012, 11:34:36 PM11/11/12
to make...@googlegroups.com
Is there any conceivable way to use PyPy on a windows machine? I haven't been able to figure it out.

Dan Newman

unread,
Nov 11, 2012, 11:41:16 PM11/11/12
to make...@googlegroups.com

On 11 Nov 2012 , at 8:34 PM, Gerald Orban wrote:

> Is there any conceivable way to use PyPy on a windows machine? I haven't
> been able to figure it out.

There is a Windows download at http://pypy.org/download.html . It also mentions
a potential need for an installer. I'm not a Windows user, so I do not know how
smoothly things will or will not go for you.

Dan


Gerald Orban

unread,
Nov 12, 2012, 12:13:05 AM11/12/12
to make...@googlegroups.com
That's the installer I've tried in the past however, when I point RepG to PyPy it complains that TKinter isn't available which offers to take me to the python website to download it. Perhaps it's a library I need to get access to elsewhere? I see it clearly in the PyPy release: "pypy-1.9\lib-python\2.7\lib-tk".

Strange. I'll try to dig a bit deeper.

Dan Newman

unread,
Nov 12, 2012, 12:29:33 AM11/12/12
to make...@googlegroups.com

On 11 Nov 2012 , at 9:13 PM, Gerald Orban wrote:

> That's the installer I've tried in the past however, when I point RepG to
> PyPy it complains that TKinter isn't available which offers to take me to
> the python website to download it. Perhaps it's a library I need to get

Tk is the GUI/windowing addition to the Tcl interpreter. Tkinter is
bindings which allow Python to use Tk.

> access to elsewhere? I see it clearly in the PyPy release:
> "pypy-1.9\lib-python\2.7\lib-tk".
>
> Strange. I'll try to dig a bit deeper.

Those directions from Jon Daniels included pulling, building, and installing
Tkinter, but for OS X and not Windows. As you have concluded, you would need
to do something similar for Windows. (I wouldn't have hit that as I most
certainly already had Tkinter installed on my Mac.)

Dan

Bottleworks

unread,
Nov 12, 2012, 12:37:22 AM11/12/12
to make...@googlegroups.com
Got it running.  Does seem quite faster!  I just need to find a better place for the binary.  I put it in /usr/local/bin, but the GUI won't let me select it if it's located there. 

Darrell jan

unread,
Nov 21, 2012, 10:07:37 PM11/21/12
to make...@googlegroups.com
All this conversation got me psyched up into trying again.

I get an error like Gerald, which says that Tkinter isn't available. But I seem to have several things that look like it:

file://localhost/Users/djan2/pypy-c-jit-58856-0e6161a009c6-osx64/lib-python/2.7/lib-tk/test/test_tkinter/
file://localhost/Users/djan2/pypy-c-jit-58856-0e6161a009c6-osx64/lib-python/2.7/lib-tk/Tkinter.py
file://localhost/Users/djan2/pypy-1.9/lib-python/2.7/lib-tk/Tkinter.pyc
file://localhost/Users/djan2/pypy-1.9/lib-python/2.7/lib-tk/test/test_tkinter/
file://localhost/Users/djan2/pypy-1.9/lib-python/2.7/lib-tk/Tkinter.py
file://localhost/Users/djan2/pypy-c-jit-58856-0e6161a009c6-osx64/__MACOSX/tkinter-pypy-0.1-for-8.5/tkinter_pypy.egg-info/
file://localhost/Users/djan2/pypy-c-jit-58856-0e6161a009c6-osx64/__MACOSX/tkinter-pypy-0.1-for-8.5/
file://localhost/Users/djan2/pypy-c-jit-58856-0e6161a009c6-osx64/tkinter-pypy-0.1-for-8.5/build/lib.macosx-10.7-x86_64-2.7/_tkinter.pypy-16.so
file://localhost/Users/djan2/pypy-c-jit-58856-0e6161a009c6-osx64/tkinter-pypy-0.1-for-8.5/
file://localhost/Users/djan2/pypy-c-jit-58856-0e6161a009c6-osx64/tkinter-pypy-0.1-for-8.5/build/temp.macosx-10.7-x86_64-2.7/src/_tkinter.o
file://localhost/Users/djan2/pypy-c-jit-58856-0e6161a009c6-osx64/tkinter-pypy-0.1-for-8.5/tkinter_pypy.egg-info/
file://localhost/Users/djan2/pypy-c-jit-58856-0e6161a009c6-osx64/tkinter-pypy-0.1-for-8.5/src/_tkinter.c
file://localhost/Users/djan2/pypy-c-jit-58856-0e6161a009c6-osx64/tkinter-pypy-0.1-for-8.5/src/tkinter.h
file://localhost/Applications/Python%202.7/Extras/Demo/tkinter/

So I thought, maybe I have that problem with the X11 paths?

I do have X11, but the ln -s /opt/X11/include/X11 /usr/local/include/X11 

gives me   ln: /usr/local/include/X11: No such file or directory

I have 4 X11 folders and an X11 app. This one seemed relevant:  file://localhost/Developer/usr/X11/

So, not really knowing what I'm doing, I tried changing to this:
ln -s /opt/X11/include/X11 /usr/X11

ln: /usr/X11/X11: Permission denied

So I'm not sure if I have a permissions problem or if the path to the wrong folder. Admittedly, I'm pretty fuzzy on unix stuff.

So for now I went back to the old python. 

But, advice is appreciated!

Darrell

On Wednesday, November 21, 2012 5:52:35 PM UTC-8, LeeJon wrote:
This is awesome! Works great, just needed a little finesse on 10.8..... Need to do everything listed on this site and I was able to get it all working just fine. Had to install the command line tools from xcode, then install x11 from: http://xquartz.macosforge.org

Then link the files needed with JonA's post: ln -s /opt/X11/include/X11 /usr/local/include/X11

Then compiled and continued from the rest of the install guide...

Thanks for the hard work everyone!!!!!

On Friday, November 9, 2012 12:53:06 PM UTC-5, Jon Daniels wrote:

JohnA.

unread,
Nov 21, 2012, 10:57:04 PM11/21/12
to make...@googlegroups.com
You probably don't have a /usr/local/include directory to make the link in?

Just a guess.

JohnA.

Darrell jan

unread,
Nov 21, 2012, 11:50:02 PM11/21/12
to make...@googlegroups.com
If I don't--what do I do? Sorry if the question is too naive-- I feel like I have big holes in what I need to know.

Dan Newman

unread,
Nov 22, 2012, 12:05:03 AM11/22/12
to make...@googlegroups.com

On 21 Nov 2012 , at 8:50 PM, Darrell jan wrote:

> If I don't--what do I do? Sorry if the question is too naive-- I feel like
> I have big holes in what I need to know.

From a terminal window (Applications > Utilities > Terminal)

sudo mkdir -m 0755 -p /usr/local/include

That command will prompt you for your password (the "sudo" part).
It will then create /usr/local/include and any intermediate directories
if needed (-p). It will also set the permissions correctly (-m 0755).

Before issuing the command, you can do a

ls /usr/local/include

If the directory does not exist, you'll see the error

ls: /usr/local/include: No such file or directory

Once you create the directory, you can then do

sudo ln -s /opt/X11/include/X11 /usr/local/include/X11

Dan

Darrell jan

unread,
Nov 22, 2012, 12:34:35 AM11/22/12
to make...@googlegroups.com
Thanks--so far so good. Now to wait until the current print is finished...

Darrell jan

unread,
Nov 22, 2012, 1:15:31 AM11/22/12
to make...@googlegroups.com
No luck--I still get the Tkinter error message. Darn???

Darrell jan

unread,
Nov 22, 2012, 11:53:55 AM11/22/12
to make...@googlegroups.com
On closer inspection, I see I had a couple error messages:

Darrell-Jans-iMac:pypy-c-jit-58856-0e6161a009c6-osx64 djan2$ ./bin/pypy ez_setup.py 
Illegal instruction: 4

djan2$ cd tkinter-pypy-0.1-for-8.5Darrell-Jans-iMac:tkinter-pypy-0.1-for-8.5 
djan2$ ../bin/pypy ./setup.py install
Illegal instruction: 4

So these are likely my problem. 

The curl right before the first error went really fast:

Darrell-Jans-iMac:pypy-c-jit-58856-0e6161a009c6-osx64 djan2$ curl http://peak.telecommunity.com/dist/ez_setup.py -o ez_setup.py
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10240  100 10240    0     0   9463      0  0:00:01  0:00:01 --:--:-- 28926

So I was suspicious and ran it again, but same thing. I ran both the above lines again, with the same results.

BTW, Happy Thanksgiving!

Gerald Orban

unread,
Nov 22, 2012, 12:59:59 PM11/22/12
to make...@googlegroups.com
I'm leaning towards having a dedicated VM to run PyPy in some form on my main desktop. It's worth a shot to compare the host OS running standard python versus the VM with Pypy :) It may be an utter failure but I'm interested in finding out.

Jon Daniels

unread,
Nov 22, 2012, 2:25:33 PM11/22/12
to make...@googlegroups.com
For 10.8, try using one of these PyPy's instead:

https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-osx64.tar.bz2

https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-osx64.tar.bz2

You might need to use a graphical web browser to download these.  Or if you have wget installed:


-Jon




On Thursday, November 22, 2012 8:53:55 AM UTC-8, Darrell jan wrote:

Darrell jan

unread,
Nov 23, 2012, 1:05:16 PM11/23/12
to make...@googlegroups.com
Gerald,

You were getting the same message I got, that Rep G couldn't find TkInter. Did you ever figure that out?

Darrell

Gerald Orban

unread,
Nov 23, 2012, 7:14:49 PM11/23/12
to make...@googlegroups.com
Not yet, I haven't had any spare time to devote to figuring out how to make PyPy play nice in windows, yet.

Some day, maybe :) This may be a fun side project come Christmas.

Darrell jan

unread,
Nov 24, 2012, 11:55:54 PM11/24/12
to make...@googlegroups.com
Well, I decided to try rebooting. And ignore that Illegal Instruction comment.

I set Pyton to pypy. Up popped a window that said that ReplicatorG had closed, and that a report could be sent to Apple. Though, it looked like RepG was still open. Anyway, there was no message about TkInter this time. GCode generation seemed to work OK, but did not seem any faster. I used Reset all Preferences and generated GCode for the snake example, then did it again after setting to pypy. Got exactly the same time, 2:02. 

So I'm not sure if it's working.

Sean J

unread,
Nov 25, 2012, 5:52:24 PM11/25/12
to make...@googlegroups.com
I am trying to get PyPy up and running too on OS X 10.6.8 (Snow Leopard).

I've downloaded and uncompressed "pypy-1.9-osx64.tar.bz2"
(The 2.0 beta1 version does not like Snow Leopard)

When I point ReplicatorG 0040 to the binary, I am also getting the TkInter error:



Any ideas?

~Sean

Jon Daniels

unread,
Nov 25, 2012, 6:18:21 PM11/25/12
to make...@googlegroups.com
Did you try running the commands at the beginning of this thread?  If so,
paste your output from Terminal and I'll see if I can help.

Cheers,
Jon

JohnA.

unread,
Nov 25, 2012, 6:47:03 PM11/25/12
to make...@googlegroups.com
This means you skipped a step above, or had an error on it.  

JohnA.

Sean J

unread,
Nov 25, 2012, 7:39:07 PM11/25/12
to make...@googlegroups.com
Hi Jon,

I get an error when I use the last command:

Seans-Mac-Pro:tkinter-pypy-0.1-for-8.5 seanj$ ../bin/pypy ./setup.py install

running install
running bdist_egg
running egg_info
writing tkinter_pypy.egg-info/PKG-INFO
writing top-level names to tkinter_pypy.egg-info/top_level.txt
writing dependency_links to tkinter_pypy.egg-info/dependency_links.txt
reading manifest file 'tkinter_pypy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'tkinter_pypy.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-x86_64/egg

running install_lib
running build_ext
building '_tkinter' extension
creating build/temp.macosx-10.6-x86_64-2.7
creating build/temp.macosx-10.6-x86_64-2.7/src
cc -arch x86_64 -fPIC -Wimplicit -DWITH_APPINIT -I/usr/include/tcl -I/usr/include/tk -I/Users/seanj/pypy-1.9/include -c src/_tkinter.c -o build/temp.macosx-10.6-x86_64-2.7/src/_tkinter.o
unable to execute cc: No such file or directory

error: command 'cc' failed with exit status 1
Seans-Mac-Pro:tkinter-pypy-0.1-for-8.5 seanj$ 

Sean J

unread,
Nov 25, 2012, 7:40:35 PM11/25/12
to make...@googlegroups.com
Also, I had to use pypy 1.9 because 2.0 beta1 gives me an "illegal command" error when I try:
./bin/pypy ez_setup.py 

Jon Daniels

unread,
Nov 25, 2012, 7:52:13 PM11/25/12
to make...@googlegroups.com
You need to install Xcode.  https://developer.apple.com/xcode/.

-Jon

Sean J

unread,
Nov 25, 2012, 8:27:53 PM11/25/12
to make...@googlegroups.com
Ah, I thought I still had it installed from when I was playing with WINE.
I must have uninstalled it.

Thanks!

Sean J

unread,
Nov 26, 2012, 5:51:52 AM11/26/12
to make...@googlegroups.com
Success!

My test file using PyPy = 41 seconds to generate
Test file using Python = 1 minute 41 seconds to generate

This is the install process that worked for me on Snow Leopard 10.6.8:
  • Install Xcode 3 from my Snow Leopard OS Installer Disc (Extras)
    • Apple no longer has any versions of Xcode 4 for download that will work with Snow Leopard
  • Install X11 from http://xquartz.macosforge.org
    • Link the X11 files (I had to use sudo and enter my password to make this work)
    • sudo ln -s /opt/X11/include/X11 /usr/local/include/X11 
    • Download PyPy version 1.9 from http://pypy.org/download.html
      • Uncompress pypy into my User folder: /Users/seanj/
    • Then I used the Terminal commands from Jon's original post (slightly tweaked):
      • cd
      • cd pypy-1.9
    • In ReplicatorG go to the ReplicatorG Menu -> Preferences -> Advanced -> Select Python Interpretor...  
    • Select the 'bin/pypy' file.

    funmakerBart

    unread,
    Nov 26, 2012, 2:29:20 PM11/26/12
    to make...@googlegroups.com
    I did not succeed with this, but maybe a workaround for the mortals afraid of sudo commands (like me).

    I have been playing with Repetier-host (good 3d representation of Gcode) together with Slic3r (dual colored prints and support with the other extruder). 
    Repetier host comes also bundled with Skeinforge and PyPy. 
    I have the settings of Repetier-host regarding skeinforge redirected to the RepG skeinforge/settings/craft location. It worked immediately, also calling PyPy. Of course the few settings of POM you now have to fill in direct in Skeinforge / make additional profiles.
    Also you have to load the Gcode in RepG to print.

    Probably missing the point here, (I'm using RepG only to let print Gcode of other slicer) but the install is easier maybe this way, and has the benefit of a good 3D representation of the Gcode to examine.
    But of course the use Skeinforge directly instead of RepG as UI is more difficult.

    Bart

    Op maandag 26 november 2012 11:51:52 UTC+1 schreef Sean J het volgende:

    Jon Daniels

    unread,
    Nov 26, 2012, 5:57:21 PM11/26/12
    to make...@googlegroups.com
    Thanks for the tip.  That got me thinking and I checked out the PyPy that is bundled with Repetier-host...   Apparently RH ignores the fact that Tkinter is not installed whereas ReplicatorG checks if Tkinter is there and won't proceed without it.

    I don't know why ReplicatorG needs Tkinter.  It could slice without it.  Anyone know?



    For anyone who doesn't want to go through installing XCode and running all the steps, you can probably use my pypy binary including Tkinter directly.   I haven't tested this on a clean machine, but I think it will work :)


    Just decompress this file and change ReplicatorG's Python Interpreter to pypy-osx/bin/pypy.  

    -Jon

    funmakerBart

    unread,
    Nov 26, 2012, 9:05:03 PM11/26/12
    to make...@googlegroups.com
    Hello Jon,
    I tried your binary, and it worked. Slicing is absolutely faster!
    Thanks very much!
    Bart

    Op maandag 26 november 2012 23:57:21 UTC+1 schreef Jon Daniels het volgende:

    Darrell jan

    unread,
    Nov 26, 2012, 9:20:06 PM11/26/12
    to make...@googlegroups.com
    Worked for me too! Snake went from 2:02 to 46 seconds. I bet larger files will have a bigger improvement.

    Many thanks!

    Darrell

    funmakerBart

    unread,
    Nov 26, 2012, 10:44:39 PM11/26/12
    to make...@googlegroups.com
    Bracelet from 24 minutes to 7 minutes!!

    Op dinsdag 27 november 2012 03:20:06 UTC+1 schreef Darrell jan het volgende:

    Laird Popkin

    unread,
    Nov 26, 2012, 11:18:43 PM11/26/12
    to make...@googlegroups.com
    Fantastic improvement here as well. 10 minutes to 4 minutes. And I'd tried a few times to get pypy to work, getting as far as the tkinter error, and your binary made it a piece of cake. Thanks!

    - LP

    Dan Newman

    unread,
    Nov 27, 2012, 1:49:51 AM11/27/12
    to make...@googlegroups.com

    On 26 Nov 2012 , at 2:57 PM, Jon Daniels wrote:

    > Thanks for the tip. That got me thinking and I checked out the PyPy that
    > is bundled with Repetier-host... Apparently RH ignores the fact that
    > Tkinter is not installed whereas ReplicatorG checks if Tkinter is there and
    > won't proceed without it.
    >
    > I don't know why ReplicatorG needs Tkinter. It could slice without it.
    > Anyone know?

    I'm fairly certain that SF is using Tkinter for the profile editing interface.
    Tk is a really well thought out, simplistic GUI building interface which was
    done for Tcl back in the mid '90s. (It's hands down the easiest programming
    interface for making a minimally serviceable, bare bones GUI in.) A number
    of interpreters such as Python, Ruby, etc. have added interfaces to it for
    purposes of making simply GUI interfaces. So, it stands to reason that SF
    is using it for its profile editing interface.

    You can, with pypy selected as your Python, see what happens when you go
    to edit a profile. And just because it works doesn't prove me wrong: it may
    be that RepG is not properly detecting whether Tkinter is available whereas
    PyPy is managing to find it.

    Dan

    Jon Daniels

    unread,
    Nov 27, 2012, 11:56:01 AM11/27/12
    to make...@googlegroups.com
    Glad to hear it's working.  I published that version of PyPy with Tkinter as a disk image on Thingiverse: http://www.thingiverse.com/thing:35883



    Shane Graber

    unread,
    Nov 29, 2012, 9:14:15 AM11/29/12
    to make...@googlegroups.com
    Has anyone gotten pypy + tkinter working on Windows yet?  I'm stuck at getting tkinter installed - erroring out with "Unable to Find vcvarall.bat"

    I've installed mingw for Windows (added c:\mingw\bin to my path) and attempted a setup.py install build --compiler=mingw32 as well and end with the same result.  Getting pypy+tkinter installed on Windows is an exercise in frustration!  :/

    Shane


    On Tue, Nov 27, 2012 at 11:56 AM, Jon Daniels <ape...@gmail.com> wrote:
    Glad to hear it's working.  I published that version of PyPy with Tkinter as a disk image on Thingiverse: http://www.thingiverse.com/thing:35883



    --
    You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/makerbot/-/ezHzgfDPdtsJ.

    To post to this group, send email to make...@googlegroups.com.
    To unsubscribe from this group, send email to makerbot+u...@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/makerbot?hl=en.



    --
    Shane 

    Adan Akerman

    unread,
    Nov 29, 2012, 12:05:04 PM11/29/12
    to make...@googlegroups.com
    I'm watching your progress with bated breath. I'm not the hacker to figure it out, but I'm eager to follow in your footsteps and get faster slicing.

    Good luck!

    funmakerBart

    unread,
    Nov 29, 2012, 3:18:56 PM11/29/12
    to make...@googlegroups.com
    I use it indirectly, by installing Repetier-host which comes bundled with slic3r and skeinforce as well pypy. Installing is easy (one-click...)
    In the preferences of Repetier host, you can redirect to the settings of skeinforge of Makerbot (or copy them). 
    The few numbers needed to change (normally by PoM of ReplicatorG) you have to put in Skeinforge (as diameter/speed/raft/infill). 
    Then slicing is about 4 times faster because of pypy. After that import the Gcode in ReplicatorG to print.
    Repetier Host has also a very accurate 3D Gcode viewer. Saves time.
    Bart

    Op donderdag 29 november 2012 18:05:04 UTC+1 schreef AdanA het volgende:

    Peter McDade

    unread,
    Dec 12, 2012, 6:34:22 PM12/12/12
    to make...@googlegroups.com
    This actually fixed an issue I have been having with Skeinforge and RepG...  The Python interpreter I had installed was stalling and creating bad Gcode...  This fixed it!

    On Friday, November 9, 2012 12:53:06 PM UTC-5, Jon Daniels wrote:
    When I saw Dan mention using PyPy to speed up Skeinforge slicing, I just had to try it.

    PyPy is an alternative python implementation that has a JIT compiler so it runs python much faster.

    Installing and using pypy for Skeinforge is not straight forward.  If you don't use the correct software packages you run into a bunch of bugs and can't use PyPy.  However, if you follow my instructions, it's easy to setup and takes less than 5 minutes.

    The result is two to five times faster Gcode generation in ReplicatorG when using Skeinforge.

    If you run into any issues, you can easily switch back to the standard python interpreter at any time.


    Here are my instructions for Mac OS X 10.7.  I believe it will work for 10.6 and 10.8 too.

    1) In a *new* Terminal window, run the following commands.  You should be in your home directory ('cd').  If you prefer, you can copy and paste all of them at once.  Just watch for any errors.

    bunzip2 pypy-c-jit-latest-osx64.tar.bz2
    tar -xf pypy-c-jit-latest-osx64.tar
    cd pypy-c-jit-*-osx64
    ./bin/pypy ez_setup.py 
    unzip tkinter-pypy-0.1-for-8.5.zip
    cd tkinter-pypy-0.1-for-8.5
    ../bin/pypy ./setup.py install

    2) In ReplicatorG go to the ReplicatorG Menu -> Preferences -> Advanced -> Select Python Interpretor...  

    3) Select the 'bin/pypy' file.  It will be inside a folder named something like pypy-c-jit-58765-034868cf23c4-osx64.
    For example mine is: jond -> pypy-c-jit-58765-034868cf23c4-osx64 -> bin -> pypy.

    4) Slice fast!   No need to restart ReplicatorG.

    I suggest you time a slice before and after so you can be amazed by the speedup too. :)

    If in doubt as to which interpreter RepG is using, you can verify by running this command while RepG is generating gcode:

    ps auxw | grep py | grep -v conveyor | grep -v grep

    The first line of the result will either contain something like 'pypy-c-jit-58765-034868cf23c4-osx64/bin/pypy' which means RepG is using PyPy, or '/usr/bin/python' which means RepG is python.  Of course, you'll probably notice the progress bar is moving way faster when slicing, which may be all the verification you need.

    Cheers.

    Andrew Russell

    unread,
    Dec 12, 2012, 8:18:08 PM12/12/12
    to make...@googlegroups.com
    Adan did you have a chance to try this out?
    I ended up skipping all the hassle and just using the pypy dmg available on Thingiverse.
    Definitely huge performance improvements with SF slicing.  I don't even bother slicing on my faster machine now, and will slice on my laptop while I let the HBP heat to desired temp.

    I should of done this months ago!

    -Andy

    Adan Akerman

    unread,
    Dec 13, 2012, 12:31:45 PM12/13/12
    to make...@googlegroups.com
    That's great that you've got pypy slicing working! Too bad that's only mac... booooo.

    I downloaded Repetier Host... then decided it was foolish to mess with the system in the midst of a job. But the last plate for that job is printing now. Hopefully I'll be able to get back to it once these parts are done 'n' d'livered. 

    I should mention that I was foolish enough to mess with the system a little bit: I put a layer of that 3M thermally conductive sheet between the aluminum and glass this morning. I can't say for sure how it's affected things thermally, though a quick view with the IR thermometer suggests much better uniformity. But it had an immediately visible unintended benefit: apparently my glass had been shimmying a little, probably because my plastic clips were weakening. But with the 3M sheet down, even without clipping it, it. does. not. move. There was some waviness on the previous plate of parts that's no longer in evidence, thank goodness.

    So that's the good news: these parts seem to be printing great: evidence of shimmy is gone. Clips are no longer needed. The bad news is that, at least by my first attempts, it's not easy to remove the glass from atop the conductive sheet. Hmm. Hmm. We'll be figuring this out soon!

    Adan

    Andy

    unread,
    Dec 13, 2012, 5:30:08 PM12/13/12
    to make...@googlegroups.com, make...@googlegroups.com
    Hah, +1/-1 .  So it sticks better, and it insulates better, but now you can't remove it!  Do you have kapton on the aluminum plate? Maybe adding or removing it will help with releasing the 3m material? 

    I am surprised repG doesn't ship with its own pypy python build, as it would help everyone, especially new folks.  I have been a python developer for a decade, but I rarely have had to "setup" python outside of fiddling with the site_customize file.  I'm not sure how challenging it would be for MBI to implement this.

    -Andy
    --
     
     

    Adan Akerman

    unread,
    Dec 14, 2012, 6:37:43 AM12/14/12
    to make...@googlegroups.com
    Hope it's okay, I referenced your +1/-1 in a quick blog post sharing an image of this: http://www.makersite.com/blog/2012/12/14/plus-one-minus-one I got a good laugh out of it.

    Yeah, if it's slicing at quadruple the speed it should surely be helpful for it to get included. But apparently Repetier Host offers lots of other benefits, so I don't mind having to spend a little time getting it set up. Probably not til tomorrow at this rate.



    --
     
     

    Andrew Russell

    unread,
    Dec 14, 2012, 7:01:29 AM12/14/12
    to make...@googlegroups.com
    Nice post :)  .  Soo... Is that glass totally *stuck* to the build platform? Like, you cant even pry the sucker off??


    --
     
     

    Adan Akerman

    unread,
    Dec 14, 2012, 8:22:02 AM12/14/12
    to make...@googlegroups.com
    I thought so. But just now I was able to get it started with a razor blade in one corner... and then it slooowly came up. Interestingly, the side against the glass stayed stuck. That is, it came up off the aluminum mostly without incident, but then peeling the sheet away from the underside of the glass was difficult, and some parts I had to raze off (it's very soft and tears from itself easily). 

    The interface sheet has a plain white side and a side with teensy black speckles. Yesterday, not knowing if there was a difference, I put the white side up. I've now flipped and reapplied it. Maybe in this configuration it will let the glass come up and leave the interface sheet on the aluminum? I may have missed it, but I don't think the documentation addressed whether there was one side that was stickier than the other. So the difference may be not in the sides of the sheet but rather the inherent surface properties of glass vs. machined aluminum.

    [early morning blog writing oops, missed a couple of words, oh well]


    --
     
     

    boardworks

    unread,
    Dec 15, 2012, 12:22:18 PM12/15/12
    to make...@googlegroups.com
    I'm curious to know also if anyone has had success with this on Windows.  I've just installed it on my late 2011 model iMac and pypy SMOKES the standard Python install.  I'm timing them with the same model right now and will post the detailed slicing timing shortly... (Or, in a while since the standard Python slicing is taking for ever!)

    Shane Graber

    unread,
    Dec 15, 2012, 12:51:32 PM12/15/12
    to make...@googlegroups.com
    I seem to recall someone installing Repetier and pointing Repetier's slicing engine to the RepG Skeinforge. Does anyone have a HOWTO on how to do this?

    Shane


    --
     
     



    --
    Shane 

    boardworks

    unread,
    Dec 15, 2012, 1:26:09 PM12/15/12
    to make...@googlegroups.com
    Holy crap, that's just amazing, look at the chart below comparing the slice of a model rocket fincan (from Thingiverse, STL file used here.)  Timings are in seconds.

    I'm going to print this on my Rep2 using the gcode generated with pypy and will report back if I have any issues.  I've attached the RepG console output for each slice (standard Python and pypy) to this post for anyone who wants to review.
    ModelRocket_RepG_Log.txt

    Dan Newman

    unread,
    Dec 15, 2012, 3:18:16 PM12/15/12
    to make...@googlegroups.com

    On 15 Dec 2012 , at 10:26 AM, boardworks wrote:

    > Holy crap, that's just amazing, look at the chart below comparing the slice
    > of a model rocket fincan (from Thingiverse<http://www.thingiverse.com/thing:8754>,
    > STL file used here <http://www.thingiverse.com/download:29793>.) Timings
    > are in seconds.
    >
    > <https://lh3.googleusercontent.com/-U5bvP-gERIY/UMzANx7jEXI/AAAAAAABGtg/pIO3MEcJ660/s1600/Screen+Shot+2012-12-15+at+10.21.48+AM.png>
    > I'm going to print this on my Rep2 using the gcode generated with pypy and
    > will report back if I have any issues. I've attached the RepG console
    > output for each slice (standard Python and pypy) to this post for anyone
    > who wants to review.

    I've been using pypy for quite some time with RepG (6+ months?) and not seen
    any issues I believe that for a while the Ultimaker folks were also using
    PyPy with RepG until they moved off of RepG altogether.

    There had been some concerns in the past which had at bottom the fact
    that keys for associative arrays (i.e., dictionaries, hash tables) played
    out in a different order from PyPy vs. straight Python. But that's no longer
    and issue (and I'm unclear of whether it ever was an issue).

    Dan

    Jwo Fox-Lee

    unread,
    Dec 15, 2012, 6:17:26 PM12/15/12
    to make...@googlegroups.com
    I've read a long time ago that PyPy introduces some bugs in the slicing. Is this issue fixed now?

    - Jwo Fox-Lee


    Dan

    --



    Dan Newman

    unread,
    Dec 15, 2012, 6:20:49 PM12/15/12
    to make...@googlegroups.com

    On 15 Dec 2012 , at 3:17 PM, Jwo Fox-Lee wrote:

    > I've read a long time ago that PyPy introduces some bugs in the slicing. Is
    > this issue fixed now?

    I myself have never seen a bug introduced in the slicing by PyPy. I assume
    that the Ultimaker folks have not either as they use PyPy with Cura.

    Dan

    whpthomas

    unread,
    Dec 16, 2012, 1:00:43 AM12/16/12
    to make...@googlegroups.com
    For those of you on the Mac that don't have xCode installed, you can download it free from the app store - then open the app and go into the preferences to download and install the command line build tools as well.

    whpthomas

    unread,
    Dec 16, 2012, 1:22:46 AM12/16/12
    to make...@googlegroups.com
    Jon: many thanks for the instructions - got pypy up and running on my Macbook Pro, it is indeed much much faster!

    wjsteele

    unread,
    Dec 16, 2012, 8:05:07 AM12/16/12
    to make...@googlegroups.com
    Perhaps I am missing your question, but Repetier already includes Skeinforge support and it is just a matter of choosing which ever slicer you want... Two big buttons on the slicing tab let you select it. No additional steps are necessary.

    Bill

    funmakerBart

    unread,
    Dec 16, 2012, 5:20:40 PM12/16/12
    to make...@googlegroups.com
    Not so difficult: install Repetier Host, Tab Slicers, choose Skeinforge, click setup.
    Change the working directory to what you want
    Leave the Python and PYPY interpreter.

    Browse to the skeinforge application you use with RepG (Like this: C:\replicatorg-0040 sailfish\skein_engines\skeinforge-50\skeinforge_application\skeinforge.py)
    Browse to the skeinforge Craft utility you use with RepG (LIke this C:\replicatorg-0040 sailfish\skein_engines\skeinforge-50\skeinforge_application\skeinforge_utilities\skeinforge_craft.py)

    Repetier Host seems to forget  the redirected Profile directories for saving. So I copy the profiles from .replicatorg to .skeinforce.
    After that you can make more profiles in Skeinforge based on the RepG settings.
    So copy the profiles in C:\Users\USER\.replicatorg\sf_50_profiles\a new profile you made\profiles  (it's empty when you never edited a profile)
    to
    C:\Users\USER\.skeinforge\profiles

    Probably you have an ABS and PLA profile than. You miss the interface of RepG, but you are having the same possibilities. 

    For more profiles (after finishing the setup), go in Repetier Host to the tab Slicer, Skeinforge, click "configure" . When opening Skeinforge, look at the tabs. The yellow fields are normally directly inputted bij RepG, the blue ones calculated.
    The important ones:
    Under carve: set your layer height
    Under dimension your filament diameter and retraction and prime
    Under fill set  the infill type, define the extra shells as well the infill solidity
    Under raft define your raft by define the amount of interface layers. Set it to zero for no raft. Support is also defined by the interface infill density
    Under speed set the values as needed: The feed and flowrate has to be the same, but much higher, like 100mm/s. The perimeter is standard printed at 50% of the speed. The travelspeed can be like 150/200mm/s

    Save the profile, and enjoy PYPY speed slicing.
    Bart












    Op zaterdag 15 december 2012 18:51:32 UTC+1 schreef Shane Graber het volgende:
    Message has been deleted

    TobyCWoods

    unread,
    Feb 23, 2013, 6:17:53 PM2/23/13
    to make...@googlegroups.com
    I am trying to install PYPY and I get an error at the end:
    running build_ext
    building '_tkinter' extension
    creating build/temp.macosx-10.8-x86_64-2.7
    creating build/temp.macosx-10.8-x86_64-2.7/src
    cc -arch x86_64 -fPIC -Wimplicit -DWITH_APPINIT -I/usr/include/tcl -I/usr/include/tk -I/Users/TobyCwood/pypy-c-jit-61334-6bf80dae95f7-osx64/tkinter-pypy-0.1-for-8.5/pypy-c-jit-61334-6bf80dae95f7-osx64/include -c src/_tkinter.c -o build/temp.macosx-10.8-x86_64-2.7/src/_tkinter.o
    unable to execute cc: No such file or directory
    error: command 'cc' failed with exit status 1
    Tobys-iMac:tkinter-pypy-0.1-for-8.5 TobyCwood $  

    Latest xcode with C++ is installed

    Wingcommander whpthomas

    unread,
    Feb 23, 2013, 6:30:24 PM2/23/13
    to make...@googlegroups.com
    When you install xcode you have to select to enable command line tools in the installation (from memory) - its an optional extra.

    TobyCWoods

    unread,
    Feb 23, 2013, 6:37:58 PM2/23/13
    to make...@googlegroups.com
    Yeah, I'm pretty sure I did that. I just reinstalled it since I had upgraded to Mountain Lion.

    Darrell jan

    unread,
    Feb 23, 2013, 6:48:53 PM2/23/13
    to make...@googlegroups.com
    Are you trying link provided by John Daniels on 11/26/12 above? That's what worked for me.

    TobyCWoods

    unread,
    Feb 23, 2013, 7:07:26 PM2/23/13
    to make...@googlegroups.com
    uhhhh. No. It did not install during the xcode update even though I had selected it. How about that? It's installing now. 


    On Saturday, February 23, 2013 3:37:58 PM UTC-8, TobyCWoods wrote:

    TobyCWoods

    unread,
    Feb 23, 2013, 7:34:23 PM2/23/13
    to make...@googlegroups.com
    Now I get another error about x11... this is like bashing ones head against the wall.

    cc -arch x86_64 -fPIC -Wimplicit -DWITH_APPINIT -I/usr/include/tcl -I/usr/include/tk -I/Users/Tobycwood/pypy-c-jit-61334-6bf80dae95f7-osx64/tkinter-pypy-0.1-for-8.5/pypy-c-jit-61334-6bf80dae95f7-osx64/tkinter-pypy-0.1-for-8.5/pypy-c-jit-61334-6bf80dae95f7-osx64/include -c src/_tkinter.c -o build/temp.macosx-10.8-x86_64-2.7/src/_tkinter.o
    In file included from src/_tkinter.c:75:
    /usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
    #       include <X11/Xlib.h>
                    ^
    1 error generated.
    error: command 'cc' failed with exit status 1

    TobyCWoods

    unread,
    Feb 23, 2013, 8:14:19 PM2/23/13
    to make...@googlegroups.com
    Jeeez That was like crazy. Had to install Xquartz since Mountain Lion no longer has X11. Had to do the include... I forget what else i had to do... but it worked. I need a drink.

    Mike Gervasi

    unread,
    Feb 23, 2013, 8:55:38 PM2/23/13
    to make...@googlegroups.com
    Still haven't gotten mine to work. Still get the tkinter error in Repg

    Starting to wonder if it's due to it being a Mac Mini and it can;t do 64 bit.

    TobyCWoods

    unread,
    Feb 24, 2013, 12:23:44 AM2/24/13
    to make...@googlegroups.com
    Whew! It runs at least 4 times faster... more importantly it handles large number of layers now without choking. I got one running now with 1290 relatively complex layers and it's hummin along smooth. It has used as much as 1.5GB of memory and stays on about 25% of the processing resources of my quad core i5... so definitely worth what was a real adventure this afternoon.

    TobyCWoods

    unread,
    Feb 24, 2013, 1:38:32 AM2/24/13
    to make...@googlegroups.com
    Wrote way too soon. An hour later and it finished... it brought the iMac to it's knees multiple times but it never seemed to crash. I watched Activity Monitor and PYPY regularly accessed 2.6GB. When it was done there was no gcode tab. I saved and there's a 178mb gcode file... but it does not load. So it seems even with PYPY RepG/Skeinforge chokes on large, complex stuff. Got to get Kisslicer workin right.

    Dan Newman

    unread,
    Feb 24, 2013, 1:42:04 AM2/24/13
    to make...@googlegroups.com

    On 23 Feb 2013 , at 10:38 PM, TobyCWoods wrote:

    > Wrote way too soon. An hour later and it finished... it brought the iMac to
    > it's knees multiple times but it never seemed to crash. I watched Activity
    > Monitor and PYPY regularly accessed 2.6GB. When it was done there was no
    > gcode tab. I saved and there's a 178mb gcode file... but it does not load.
    > So it seems even with PYPY RepG/Skeinforge chokes on large, complex stuff.
    > Got to get Kisslicer workin right.

    But how will KISSlicer help? The issue is that RepG cannot load large gcode
    files unless you take steps to tell the Java VM that it can consume more
    memory. So, you run KISSlicer and it generates a large gcode file. You
    still need to get that gcode file into RepG to turn it into s3g/x3g. Failing
    that, you could try to get MakerWare to process that large gcode file. But
    then you will really be in a Brave New World running KISSlicer gcode through
    MakerWare.

    Dan

    TobyCWoods

    unread,
    Feb 24, 2013, 2:24:18 AM2/24/13
    to make...@googlegroups.com
    The gcode file from KS loads fine in RepG... it's only 46MB.. 
    I loaded the Skeinforge Gcode... the 178MB file and compare it to what KS made into Repetier Host. ALOTTA paths! The smaller KS file paths are much simpler. I'll try to print the KS file mañana. 
    I can load gcode in MW? You mean slice it in MW right? MW on High is using Skeinforge and won't Skeinforge go to the default Python... what RepG was using before I switched it to PYPY... right?
    As such it'll just choke alot sooner like it did before.

    Dan Newman

    unread,
    Feb 24, 2013, 11:02:07 AM2/24/13
    to make...@googlegroups.com

    On 23 Feb 2013 , at 11:24 PM, TobyCWoods wrote:

    > The gcode file from KS loads fine in RepG... it's only 46MB..
    > I loaded the Skeinforge Gcode... the 178MB file and compare it to what KS
    > made into Repetier Host. ALOTTA paths! The smaller KS file paths are much
    > simpler. I'll try to print the KS file mañana.

    Being much smaller will definitely help. In SF, you can reduce the file
    size some by using the line-based infill. (Fewer paths for infill.)

    > I can load gcode in MW?

    I don't use MW myself. However, I assumed that you could load gcode into
    it. If you cannot, then I don't see how MBI expects their more experienced
    users to want to use it if they are then constrained to only using MBI's
    slicer.

    Dan

    TobyCWoods

    unread,
    Feb 24, 2013, 12:01:45 PM2/24/13
    to make...@googlegroups.com
    IMO they can be doing Makerware so they have more control over the user experience with their product. However, again IMO, the device should be decoupled from the software as much as possible and that all device producers should be using a standard interface between the device and the controlling software. Where's ISO? MBI is taking on too much with MW. Instead of focusing all their energies into their flagship product and maintaining the mainstays (rep 2 and rep1 respectively) they are flailing around and making incredibly bad decisions regarding issues that can break them. 

    Scott Van Vliet

    unread,
    Mar 4, 2013, 10:40:12 AM3/4/13
    to make...@googlegroups.com
    If you check earlier in this thread, as someone posted a link to a pre-compiled pypy instance that works wonderfully for me on Mountain Lion.

    Sent from my mobile device

    On Mar 2, 2013, at 2:11 AM, Kyle Ronan <kyle...@gmail.com> wrote:

    I cant seem to get this to work :( Have downloaded Xcode also python. Just get tkinter error in repg and this error on install?

    Kyles-MacBook-Pro-4:tkinter-pypy-0.1-for-8.5 kyleronan$ ../bin/pypy ./setup.py install
    running install
    running bdist_egg
    running egg_info
    writing tkinter_pypy.egg-info/PKG-INFO
    writing top-level names to tkinter_pypy.egg-info/top_level.txt
    writing dependency_links to tkinter_pypy.egg-info/dependency_links.txt
    reading manifest file 'tkinter_pypy.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'tkinter_pypy.egg-info/SOURCES.txt'
    installing library code to build/bdist.macosx-10.8-x86_64/egg
    running install_lib
    running build_ext
    building '_tkinter' extension
    creating build/temp.macosx-10.8-x86_64-2.7
    creating build/temp.macosx-10.8-x86_64-2.7/src
    cc -arch x86_64 -fPIC -Wimplicit -DWITH_APPINIT -I/usr/include/tcl -I/usr/include/tk -I/Users/kyle/pypy-c-jit-61334-6bf80dae95f7-osx64/include -c src/_tkinter.c -o build/temp.macosx-10.8-x86_64-2.7/src/_tkinter.o
    unable to execute cc: No such file or directory
    error: command 'cc' failed with exit status 1
    Kyles-MacBook-Pro-4:tkinter-pypy-0.1-for-8.5 kyle$ 


    Any help?



    On Friday, November 9, 2012 5:53:06 PM UTC, Jon Daniels wrote:
    When I saw Dan mention using PyPy to speed up Skeinforge slicing, I just had to try it.

    PyPy is an alternative python implementation that has a JIT compiler so it runs python much faster.

    Installing and using pypy for Skeinforge is not straight forward.  If you don't use the correct software packages you run into a bunch of bugs and can't use PyPy.  However, if you follow my instructions, it's easy to setup and takes less than 5 minutes.

    The result is two to five times faster Gcode generation in ReplicatorG when using Skeinforge.

    If you run into any issues, you can easily switch back to the standard python interpreter at any time.


    Here are my instructions for Mac OS X 10.7.  I believe it will work for 10.6 and 10.8 too.

    1) In a *new* Terminal window, run the following commands.  You should be in your home directory ('cd').  If you prefer, you can copy and paste all of them at once.  Just watch for any errors.

    bunzip2 pypy-c-jit-latest-osx64.tar.bz2
    tar -xf pypy-c-jit-latest-osx64.tar
    cd pypy-c-jit-*-osx64
    ./bin/pypy ez_setup.py 
    unzip tkinter-pypy-0.1-for-8.5.zip
    cd tkinter-pypy-0.1-for-8.5
    ../bin/pypy ./setup.py install

    2) In ReplicatorG go to the ReplicatorG Menu -> Preferences -> Advanced -> Select Python Interpretor...  

    3) Select the 'bin/pypy' file.  It will be inside a folder named something like pypy-c-jit-58765-034868cf23c4-osx64.
    For example mine is: jond -> pypy-c-jit-58765-034868cf23c4-osx64 -> bin -> pypy.

    4) Slice fast!   No need to restart ReplicatorG.

    I suggest you time a slice before and after so you can be amazed by the speedup too. :)

    If in doubt as to which interpreter RepG is using, you can verify by running this command while RepG is generating gcode:

    ps auxw | grep py | grep -v conveyor | grep -v grep

    The first line of the result will either contain something like 'pypy-c-jit-58765-034868cf23c4-osx64/bin/pypy' which means RepG is using PyPy, or '/usr/bin/python' which means RepG is python.  Of course, you'll probably notice the progress bar is moving way faster when slicing, which may be all the verification you need.

    Cheers.

    --
    You received this message because you are subscribed to a topic in the Google Groups "MakerBot Operators" group.
    To unsubscribe from this topic, visit https://groups.google.com/d/topic/makerbot/lv9AupRqSnY/unsubscribe?hl=en-US.
    To unsubscribe from this group and all its topics, send an email to makerbot+u...@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
     
     

    Jon Daniels

    unread,
    Mar 4, 2013, 11:34:53 AM3/4/13
    to make...@googlegroups.com


    On Saturday, March 2, 2013 2:11:52 AM UTC-8, Kyle Ronan wrote:
    I cant seem to get this to work :( Have downloaded Xcode also python. Just get tkinter error in repg and this error on install?

    Any help?


    TobyCWoods

    unread,
    Mar 4, 2013, 1:18:01 PM3/4/13
    to make...@googlegroups.com
    Lucky! I spent a whole afternoon figggirin it out!

    Chances are to get it to compile you needed x11... which on Mountain Lion has to be Xquartz and xcode needs to be told where it is. The script line is in the thread. The Command Line add in for xcode also has to be downloaded. 

    OS

    unread,
    Mar 4, 2013, 7:56:29 PM3/4/13
    to make...@googlegroups.com
    Friggin awesome, thanks!

    David Celento

    unread,
    Mar 16, 2013, 10:42:22 PM3/16/13
    to make...@googlegroups.com
    For Mac users following whpthomas pdf instructions (at http://www.thingiverse.com/thing:61022) but are having problems installing pypy in Terminal because invisible characters are not evident in the PDF, this image may help a bit, showing them.

    Of course, copying it from the initial post above gets you there, too! 


    David Celento

    unread,
    Mar 16, 2013, 10:47:48 PM3/16/13
    to make...@googlegroups.com
    After installing XCode (v4.6.1 on OSX 10.7.5), the Command Line prefs can be installed under Preferences > Downloads > Command Line Tools 
    About a 145 meg download.

    Mike Gervasi

    unread,
    Mar 17, 2013, 7:02:32 AM3/17/13
    to make...@googlegroups.com
    Tried to install pypy on a Mac mini that's running my bot but I don't think it's possible being it's not full 64 bit compatible. Kept getting the Tkinter error. Loaded on my Mac pro no prob.


    On Sat, Mar 16, 2013 at 10:47 PM, David Celento <dcel...@gmail.com> wrote:
    After installing XCode (v4.6.1 on OSX 10.7.5), the Command Line prefs can be installed under Preferences > Downloads > Command Line Tools 
    About a 145 meg download.

    --
    You received this message because you are subscribed to a topic in the Google Groups "MakerBot Operators" group.
    To unsubscribe from this topic, visit https://groups.google.com/d/topic/makerbot/lv9AupRqSnY/unsubscribe?hl=en-US.
    To unsubscribe from this group and all its topics, send an email to makerbot+u...@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
     
     



    --
    Mike

    David Celento

    unread,
    Mar 17, 2013, 8:34:52 AM3/17/13
    to make...@googlegroups.com
    Mike, you might have luck following the link related to Ktinker: http://www.python.org/download/mac/tcltk/#activetcl-8-5-13. Based on the chart, I think the Mac Mini will want: ActiveTcl 8.4.19.

    At this thread: https://groups.google.com/forum/#!topic/makerbot/YjdiI2b1hRc, I offer some simplified instructions that bypasses a lot of the work above. 

    ** Especially see the revised instructions (about seven deep), due to X11 upgrades, etc.**

    ~Dave

    Mike Gervasi

    unread,
    Mar 17, 2013, 8:43:22 AM3/17/13
    to make...@googlegroups.com
    Thanks Dave, gonna give it another go tonight. Currently slicing on the Pro and saving to SD through the network to the mini. Be nice to get back to "all in one box"  :)


    --
    You received this message because you are subscribed to a topic in the Google Groups "MakerBot Operators" group.
    To unsubscribe from this topic, visit https://groups.google.com/d/topic/makerbot/lv9AupRqSnY/unsubscribe?hl=en-US.
    To unsubscribe from this group and all its topics, send an email to makerbot+u...@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
     
     



    --
    Mike
    Reply all
    Reply to author
    Forward
    0 new messages