Skip to content
Tomas Mudrunka edited this page Apr 26, 2019 · 22 revisions

General approach to install bCNC on any system

From PyPI

You need python2.7 with tkinter support and working pip. Then you can use pip install bCNC to install bCNC and all it's dependencies (except for tkinter, which has to be installed/compiled as integral part of python). After that it can be launched using python -m bCNC command.

Note that if you have both python2 and python3 installed, you might need to use python2 and/or pip2 binaries rather than just python and pip, to make sure that correct version of python is used. If you don't have pip binary for correct python in your PATH, you can launch it by calling python -m pip rather than just pip.

https://pypi.org/project/bCNC/

That's all you need to know. Rest of this document are just examples of how to do that in special cases on specific OS:

From git

If you want to use pip install --upgrade git+https://github.com/vlachoudis/bCNC to install latest development version from github (because you are a developer, or you want to try new cool features), you will also need git binary installed and available in your PATH, so pip can use it to fetch the source code from github.

If you don't have git installed, you can use pip install --upgrade https://github.com/vlachoudis/bCNC/archive/master.zip

Alternatively you can use pip2 install . directly in git folder.

Or just download sources from github, unpack it and launch it by python -m bCNC in that folder or double clicking the main .py file. It will work given that you've previously done pip install bCNC, which downloaded and installed all the required dependencies.


Linux / BSD

  1. Update your system (Optional) and install git, python (with tkinter support) and pip:
	#This is specific for Debian/Ubuntu, other distros have other package managers than apt-get
	sudo apt-get update
	sudo apt-get upgrade
	sudo apt-get install git python python-tk python-pip
  1. Install bCNC using pip and launch it:
	sudo pip2 install --upgrade bCNC
	#sudo pip2 install --upgrade git+https://github.com/vlachoudis/bCNC #if you want git version
	python2 -m bCNC

Happy milling!

Building packages for your distribution

If you are package maintainer of distribution, there's likely some unified way to make Python packages for your distro. Eg.:


Windows

Using PIP

1.) Install python 2.7: https://www.python.org/downloads/

Do not forget to install Tcl/Tk and PIP modules while doing so. Also check that python will be added to path:

2.) Open commandline and install bCNC using pip:

This installs bCNC to C:\Pyhton27\Lib\site-packages\bCNC\ and launches it using python -m bCNC

.exe build

There might be experimental .exe build available at https://github.com/vlachoudis/bCNC/releases Such build does not need anything, since it comes bundled with python and all needed libraries. Only download, unpack zip and launch bCNC.exe

If you want to build .exe yourself, it's possible. But first you need to install python+pip and non-exe version of bCNC with all it's requirements on Windows. Then there is make-exe.bat in the bCNC install directory to build the exe.

Following table is probably outdated

OS Python Notes
Windows XP SP3 2.7.5 pyserial newer than 3.0.1 will not work
Windows Vista SP2 2.7.9
Windows 7 2.7.* Any 2.7 version should work
Windows 8.1 2.7.10 is known to work
Windows 10 2.7.* Any 2.7 version should work

Mac OSX

FIXME: This can be probably simplified. Any mac user here to update this?

It is recommended to use Homebrew for installing dependencies.

  1. Install git and Python
    brew install git
    brew install python --with-tcl-tk
  1. Activate the brew python version. At the time of writing, the standard "brew link python" method no longer works. Put the brew path before the OS provided PATH in your profile files. See notes on homebrew github. For example, in your .bash_profile and/or .profile, add the following line (or adapt the PATH line that is in there already), and restart the terminal session.
    export PATH=$(brew --prefix)/opt/python/libexec/bin:${PATH}
  1. Install a recent version of tcl-tk. At the time of writing, you may need the dev version, in order to avoid a SIGABRT. See notes on homebrew github.
    brew install --devel tcl-tk
  1. Install zlib which is required by python-imaging. See notes on Stackoverflow.
    brew install homebrew/dupes/zlib
    brew link zlib --force 
  1. Install and launch bCNC
    pip install --upgrade bCNC
    #pip install --upgrade git+https://github.com/vlachoudis/bCNC #if you want git version
    python -m bCNC

Notes

ARM systems, Raspberry PI, Orange PI, Whatever PI

Installs the same way as any other Linux. But bear in mind that opencv-python can't be currently installed using PIP on ARM, this might give you some problems.

Some packages might be needed in order to install source distribution of python modules:

apt-get install python-pip python-setuptools python-dev python-tk libjpeg-dev zlib1g-dev

Automatic builds

On this page there is mention of way to build .deb and .exe packages. I wish to do this automaticaly, but don't have the needed infrastructure. If you manage to setup automatic builds of bCNC, please let us know.

Clone this wiki locally