Open MantaRayDeeJay opened 5 years ago
@MantaRayDeeJay it's like so that did not work the command "clear" ???? This is not a single screenshot? @MantaRayDeeJay "python2 -m pip install --upgrade bCNC"
sfinexer@sfinexer:~$ pip list
Package Version
---------------------------------- -----------
alabaster 0.7.8
apt-xapian-index 0.49
asn1crypto 0.24.0
astroid 1.6.5
Babel 2.6.0
backports-abc 0.5
backports.functools-lru-cache 1.5
backports.shutil-get-terminal-size 1.0.0
bCNC 0.9.14.57
beautifulsoup4 4.7.1
bleach 3.1.0
cairocffi 0.7.2
CairoSVG 1.0.20
certifi 2018.8.24
cffi 1.12.2
chardet 3.0.4
cloudpickle 0.8.0
configobj 5.0.6
configparser 3.5.0b2
cryptography 2.6.1
decorator 4.3.0
defusedxml 0.5.0
docutils 0.14
entrypoints 0.3
enum34 1.1.6
funcsigs 1.0.2
functools32 3.2.3.post2
future 0.16.0
futures 3.2.0
html5lib 1.0.1
idna 2.6
imagesize 1.0.0
ipaddress 1.0.17
ipykernel 4.9.0
ipython 5.8.0
ipython-genutils 0.2.0
isort 4.3.4
jedi 0.13.2
Jinja2 2.10
jsonschema 2.6.0
jupyter-client 5.2.3
jupyter-core 4.4.0
keyring 17.1.1
keyrings.alt 3.1.1
lazy-object-proxy 1.3.1
logilab-common 1.4.2
lxml 4.3.2
MarkupSafe 1.1.0
mccabe 0.6.1
mercurial 4.8.2
mistune 0.8.4
mock 2.0.0
nbconvert 5.4.0
nbformat 4.4.0
numpy 1.16.2
numpydoc 0.7.0
olefile 0.46
packaging 19.0
pandocfilters 1.4.2
parso 0.3.1
pathlib2 2.3.3
pbr 4.2.0
pexpect 4.6.0
pickleshare 0.7.5
Pillow 5.4.1
pip 18.1
ply 3.11
Printrun 1.6.0
prompt-toolkit 1.0.15
psutil 5.5.1
pycairo 1.16.2
pycodestyle 2.4.0
pycparser 2.19
pycrypto 2.6.1
pyflakes 2.0.0
pyglet 1.3.0
Pygments 2.3.1
PyGObject 3.30.4
pylint 1.9.4
PyOpenGL 3.1.0
pyOpenSSL 19.0.0
pyparsing 2.2.0
pyserial 3.0.1
python-apt 1.8.4
python-dateutil 2.7.3
python-debian 0.1.34
python-xlib 0.23
pytz 2018.9
pyxdg 0.25
pyzmq 17.1.2
QtAwesome 0.4.4
qtconsole 4.3.1
QtPy 1.3.1
requests 2.21.0
roman 2.0.0
rope 0.10.5
scandir 1.9.0
scour 0.37
SecretStorage 2.3.1
setuptools 40.8.0
simplegeneric 0.8.1
singledispatch 3.4.0.3
six 1.12.0
soupsieve 1.8
Sphinx 1.8.4
spyder 3.3.3
spyder-kernels 0.2.4
testpath 0.4.2
tornado 5.1.1
traitlets 4.3.2
typing 3.6.6
urllib3 1.24.1
vboxapi 1.0
wcwidth 0.1.7
webencodings 0.5.1
wheel 0.32.3
wrapt 1.10.11
wxPython 3.0.2.0
wxPython-common 3.0.2.0
sfinexer@sfinexer:~$ python -m pip install --upgrade bCNC
Requirement already up-to-date: bCNC in ./.local/lib/python2.7/site-packages (0.9.14.57)
Requirement already satisfied, skipping upgrade: Pillow>=4.0 in /usr/lib/python2.7/dist-packages (from bCNC) (5.4.1)
Requirement already satisfied, skipping upgrade: pyserial<=3.0.1 in ./.local/lib/python2.7/site-packages (from bCNC) (3.0.1)
Requirement already satisfied, skipping upgrade: numpy>=1.12 in /usr/lib/python2.7/dist-packages (from bCNC) (1.16.2)
sfinexer@sfinexer:~$ python2 --version
Python 2.7.16
sfinexer@sfinexer:~$ uname -a
Linux sfinexer 4.19.0-4-rt-amd64 #1 SMP PREEMPT RT Debian 4.19.28-2 (2019-03-15) x86_64 GNU/Linux
But then in my opinion just a problem with the download ...
@MantaRayDeeJay But why do you have a new pillow 6.0.0 and absolutely all the other packages are old? Ie, your system is not evenly updated.
@sfinexer "Clear" cmd is OK and there is only one snapshot. I'm using Putty under Windows 10, so even after a clear cmd, I can scroll a bit !
@sfinexer I have tried the "python2 -m pip install --upgrade bCNC" cmd.
@sfinexer My linux distro seems to be OK.
@MantaRayDeeJay I do not think that the error in bCNC, the problem you have. For some reason, you do not download the package. By the way, the pillow V6 package is not in the Debian repository. Especially in your version.
@MantaRayDeeJay But why do you have a new pillow 6.0.0 and absolutely all the other packages are old? Ie, your system is not evenly updated.
I don't know why, my system seems to be updated.
stretch (stable) (python): Python Imaging Library (Pillow fork) 4.0.0-4: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x buster (testing) (python): Python Imaging Library (Pillow fork) 5.4.1-2: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x sid (unstable) (python): Python Imaging Library (Pillow fork) 5.4.1-2: alpha amd64 arm64 armel armhf hppa hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 m68k mips mips64el mipsel powerpcspe ppc64 ppc64el riscv64 s390x sh4 sparc64 x32 experimental (python): Python Imaging Library (Pillow fork) 6.0.0-1: amd64 arm64 armel armhf hppa hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 m68k mips mips64el mipsel powerpcspe ppc64 ppc64el riscv64 s390x sh4 sparc64 x32
@sfinexer I'm a bit newbie with Linux ARM devices, so I don't know where begin investigate, would you have some advices ?
pip2 install --upgrade bCNC
pip2 install --upgrade git+https://github.com/vlachoudis/bCNC
pip2 install . #in git directory
python2 -m pip install --upgrade bCNC
I repeat that there is probably somewhere you have a problem. Try installing python-pil (pillow) yourself
Just download the archive and that's it.
@sfinexer I have checked that I have well downloaded the last stable armbian stretch version (v5.75) for my device (opi zero) but I will have to try with an older stable version (3.4 kernel) to see if it works better. Thanks for the tips.
@MantaRayDeeJay Download the archive as shown by the link and run bCNC. You obviously have a bug in the peripheral software and not in the bCNC target program.
What happens if you try to install pillow separately?
python2 -m pip install --upgrade 'Pillow>=4.0'
You can also try to uninstall the debian package, so there's no conflict with package installed by pip.
I repeat that there is probably somewhere you have a problem.
@sfinexer But have you tried on ARM system? It seems ARM packages have issues with compatibility, eg. #1063
Also check pip version by python2 -m pip --version
and try upgrading python2 -m pip install --upgrade pip
Please make sure there's enough free space at your raspi df -h
If none of this helps, you should ask Pillow developers to help you with installing on the ARM (raspi):
https://github.com/python-pillow/Pillow https://pypi.org/project/Pillow/
@Harvie Debian and its package versions are independent of the processor architecture. With some exceptions. In this case, somehow it happened that the versions became confused. I assume that as a novice user could temporarily change the system update settings previously. Thus, some packages are updated from the experimental branch. Back versions of packages, debian is not able to return, only reinstallation of packages, and then errors are possible.
The current package base does not match any version of debian. Thus, there may be packet conflicts.
Debian and its package versions are independent of the processor architecture.
I am not talking about Debian packages. I am talking about PyPI. I've attached link to similar issue we had in past to my previous comment.
I must admit that if there is a mistake, it is clearly not with us. Sometimes, to prove an error in the third-party software is difficult, even leaving patches. The main reason is the lack of a primary developer, ie the one who originally made the program. And those who now support software sometimes do not fully understand the specifics of the work. This may apply to both PyPI and another program.
Many of the errors that were in my own software, it was possible to reveal after years! The end user does not understand the specifics of the program, may accept the error as a certain functional feature, and not report it.
@sfinexer I have clone the git projet and tried to launch bCNC. I have always some errors.
@Harvie pip2 are checked and up to date. I have also enough space on the SD card.
@Harvie Trying python2 -m pip install --upgrade 'Pillow>=4.0'
without any success !
In the last screenshot you have the problem described. It needs zlib header files. Debian will probably call the package zlib-dev or something similar...
There is no binary package of pillow for ARM, so Pip is going to automaticaly build the pillow from sources for you. See the section "building from source" to get list of prerequisites for that:
https://pillow.readthedocs.io/en/latest/installation.html#building-from-source
@Harvie I have checked and I can find a zlib1g package in the list, is it different from zlib-dev ?
@Harvie I have found this French tutoriel for Raspberry PI which using the Raspbian OS. This device is based on an ARM SoC as my Orange Pi Zero (Allwinner H2+). I know there are some differences between Raspbian and Armbian but these two distro are based on Debian for ARM architecture, so I think if it works well with the Raspberry, I would be able to use it with an Orange Pi !!! French Title : bCNC - Installation sur Raspberry Pi (Rasbian) https://www.youtube.com/watch?v=Mfoh6LVZaMA
zlib1g, zlib1g-dev zlib1g:i386
@sfinexer zlib1g-dev installed. I don't think needed having zlib1g:i386 because I have an armhf architecture.
@sfinexer The result below in the text file.
OPi Zero - Debian Stretch - Pillow 4.0.0 install manually - Error.txt
@sfinexer I have opened an issue with Pillow. Thanks for your tips. https://github.com/python-pillow/Pillow/issues/3806
and zlib1g ?
zlib1g-dev and zlib1g are two different packages. I have a repository like this.
@sfinexer zlib1g was already loaded in my linux distro by default, I think.
@sfinexer So now I have the 2 versions :
pizero@orangepizero:~$ sudo apt list --installed | grep -i zlib
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
zlib1g/stable,now 1:1.2.8.dfsg-5 armhf [installed]
zlib1g-dev/stable,now 1:1.2.8.dfsg-5 armhf [installed]
@sfinexer I have solved the pb. with Pillow :
sudo apt-get install python-dev python-setuptools
https://pillow.readthedocs.io/en/latest/installation.html#building-on-linux--no-cache-dir
option for pip2 because sometimes the installation crashes cause of out of memory (RAM). I have only 512MB on my OPi. It explains why I have had sometimes the error message killed
during the install process
sudo pip2 install --no-cache-dir --upgrade Pillow
@sfinexer Now I'm trying to install bCNC but the process seems to be crached during the packages installation. I'm connected via SSH and the process animation seems to be stopped as a "freeze" for more than 20mn.
I try to install all other packages manually before installing nCNC (pyserial and numpy) pyserial is OK
Numpy installation is very very slow...
It seems, I have some problems to install numpy.
pizero@orangepizero:~$ sudo pip2 install --upgrade 'numpy>=1.12'
Collecting numpy>=1.12
Downloading https://files.pythonhosted.org/packages/93/48/956b9dcdddfcedb1705839280e02cbfeb2861ed5d7f59241210530867d5b/numpy-1.16.3.zip (5.1MB)
100% |████████████████████████████████| 5.1MB 34kB/s
Building wheels for collected packages: numpy
Running setup.py bdist_wheel for numpy ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-YlBqhT/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpxUXmTgpip-wheel- --python-tag cp27:
Running from numpy source directory.
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for numpy
Running setup.py clean for numpy
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-YlBqhT/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
Running from numpy source directory.
`setup.py clean` is not supported, use one of the following instead:
- `git clean -xdf` (cleans all files)
- `git clean -Xdf` (cleans all versioned files, doesn't touch
files that aren't checked into the git repo)
Add `--force` to your command to use it anyway if you must (unsupported).
----------------------------------------
Failed cleaning build dir for numpy
Failed to build numpy
Installing collected packages: numpy
Running setup.py install for numpy ... -
Oh yes !
Failed to build numpy
Installing collected packages: numpy
Running setup.py install for numpy ... done
Successfully installed numpy-1.16.3
pizero@orangepizero:~$ sudo pip2 list
[sudo] password for pizero:
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
numpy (1.16.3)
Pillow (6.0.0)
pip (9.0.1)
pyserial (3.0.1)
setuptools (33.1.1)
pizero@orangepizero:~$
It seems that sometimes I mustn't use the "--no--cache-dir" pip option to install a package. A progress bar should be a useful help to avoid waiting a long time without to know if the process is crashed or not during a pip package install. Work in progress... LOL
bCNC seems to be installed good !
pizero@orangepizero:~$ sudo pip2 install --upgrade bCNC
Collecting bCNC
Using cached https://files.pythonhosted.org/packages/c8/cd/0e7f365c17cd101fe761b90f57a343fdceb4e3c4b7b9adb5eb05ce28359f/bCNC-0.9.14.57.tar.gz
Requirement already up-to-date: Pillow>=4.0 in /usr/local/lib/python2.7/dist-packages (from bCNC)
Requirement already up-to-date: numpy>=1.12 in /usr/local/lib/python2.7/dist-packages (from bCNC)
Requirement already up-to-date: pyserial<=3.0.1 in /usr/local/lib/python2.7/dist-packages (from bCNC)
Building wheels for collected packages: bCNC
Running setup.py bdist_wheel for bCNC ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-IFlcT4/bCNC/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpEqzGyepip-wheel- --python-tag cp27:
Running bCNC setup...
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for bCNC
Running setup.py clean for bCNC
Failed to build bCNC
Installing collected packages: bCNC
Running setup.py install for bCNC ... done
Successfully installed bCNC-0.9.14.57
pizero@orangepizero:~$ sudo pip2 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
bCNC (0.9.14.57)
numpy (1.16.3)
Pillow (6.0.0)
pip (9.0.1)
pyserial (3.0.1)
setuptools (33.1.1)
pizero@orangepizero:~$
Next Step -> Testing it !!!
@MantaRayDeeJay Do you start everything? Could not be somewhat short form, if possible, to describe what you think was problematic.
After installed the "python-tk" package, I can launch bCNC on my OPi zero 512 !
@sfinexer Summary :
To install bCNC on my OPi zero 512MB, I have done the following cmd :
apt
sudo apt-get install python-pip python-setuptools python-dev python-tk libjpeg-dev zlib1g-dev
pip
sudo pip2 install --no-cache-dir --upgrade 'Pillow>=4.0'
sudo pip2 install --upgrade 'pyserial<=3.0.1'
sudo pip2 install --upgrade 'numpy>=1.12'
sudo pip2 install --upgrade bCNC
Rem. 1 : installing numpy is particulary slow. Rem. 2 : Sometimes, I need adding the "--no-cache_dir" pip option (for Pillow, if not, I have a killed error at 99%), sometimes I mustn't (for numpy, if not, the app install "freeze") to install well a module via pip.
___ ____ _ _____
/ _ \ _ __ __ _ _ __ __ _ ___ | _ \(_) |__ /___ _ __ ___
| | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | | / // _ \ '__/ _ \
| |_| | | | (_| | | | | (_| | __/ | __/| | / /| __/ | | (_) |
\___/|_| \__,_|_| |_|\__, |\___| |_| |_| /____\___|_| \___/
|___/
Welcome to ARMBIAN 5.75 stable Debian GNU/Linux 9 (stretch) 4.19.25-sunxi
System load: 0.42 0.24 0.09 Up time: 1 min
Memory usage: 14 % of 492MB IP: 192.168.2.246 192.168.2.247
CPU temp: 42°C
Usage of /: 13% of 15G
Last login: Thu Apr 25 14:33:27 2019 from 192.168.2.123
bCNC (0.9.14.57)
numpy (1.16.3)
Pillow (6.0.0)
pip (9.0.1)
pyserial (3.0.1)
setuptools (33.1.1)
I am really glad that you've managed to install this in the end. I don't really know what to do about this. Probably we should write some short installation manual, so other people can install it just like you did. But still it seems to me that it's bit too complex. I wonder if there's easier way. To be honest i've already lost track of all the stuff you had to do in order to install it. Can you please summarize it? Or maybe test it on fresh armbian install?
@Harvie I have tried to summarize it in my last message but I think it would be usefull to test it again on a new fresh armbian install as you suggest me ! Let me a bit of time to do it, I need to have a rest now ! it's tiring for a newbie in Linux environment !
@MantaRayDeeJay After you do the apt instal, in my opinion all of these commands:
sudo pip2 install --no-cache-dir --upgrade 'Pillow>=4.0'
sudo pip2 install --upgrade 'pyserial<=3.0.1'
sudo pip2 install --upgrade 'numpy>=1.12'
sudo pip2 install --upgrade bCNC
can be replaced by single:
sudo pip2 install --no-cache-dir --upgrade bCNC
There's probably some bug in pip, if this is not working, because it should install exactly these 3 packages before installing bCNC.
I've added the note about apt-get packages here: https://github.com/vlachoudis/bCNC/wiki/Installation#arm-systems-raspberry-pi-orange-pi-whatever-pi
@Harvie The problem is that pip seems not be very reliable with "low hardware setup". If I use the "--no-cache-dir" option, numpy installation "freeze". I will have to test it again later.
pip seems not be very reliable with "low hardware setup"
Can you please figure this out with pip developers? https://github.com/pypa/pip
Please let me some time, I'm working on other issues with my devices. (OPi WiFi cnx and CNC device usb cnx) I will be back later, thanks.
I have an error while trying download bCNC via pip. Hardware : Orange Pi Zero 512Mo with Armbian v5.75 Debian Stretch v4.19.25