[Ubuntu] Fail to run from source - fixed for next version
Cloned from the beta branch, ran setup_ubuntu.sh
and it mostly completes, however there is no easy_install
built in with python 3.8. Running pip install setuptools
also doesn’t install it nor does the version installed by using the Ubuntu version:
> sudo apt install python-setuptools
python-setuptools is already the newest version (44.0.0-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> sudo -H easy_install -U distribute
sudo: easy_install: command not found
Commenting out the easy_install line works, and running make install
installs it locally. However running it fails with:
./flatcam-beta
Traceback (most recent call last):
File "/home/ninjaandre/flatcam/assets/linux/../..//FlatCAM.py", line 58, in <module>
VisPyPatches.apply_patches()
File "/home/ninjaandre/flatcam/appGUI/VisPyPatches.py", line 32, in apply_patches
markers._marker_dict['++'] = cross_lines
AttributeError: module 'vispy.visuals.markers' has no attribute '_marker_dict'
I’m pretty sure all the dependencies are there:
make install_dependencies
sudo -H ./setup_ubuntu.sh
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpng-dev is already the newest version (1.6.37-2).
python3-dev is already the newest version (3.8.2-0ubuntu2).
python3-simplejson is already the newest version (3.16.0-2ubuntu2).
libgeos-dev is already the newest version (3.8.0-1build1).
libspatialindex-dev is already the newest version (1.9.3-1build1).
python3-gdal is already the newest version (3.0.4+dfsg-1build3).
python3-pyqt5 is already the newest version (5.14.1+dfsg-3build1).
python3-pyqt5.qtopengl is already the newest version (5.14.1+dfsg-3build1).
qt5-style-plugins is already the newest version (5.0.0+git23.g335dbec-3ubuntu4).
libfreetype6 is already the newest version (2.10.1-2ubuntu0.1).
libfreetype6-dev is already the newest version (2.10.1-2ubuntu0.1).
python3-tk is already the newest version (3.8.10-0ubuntu1~20.04).
python3-pip is already the newest version (20.0.2-5ubuntu1.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Requirement already satisfied: pip in /usr/local/lib/python3.8/dist-packages (21.3.1)
Requirement already satisfied: numpy in /usr/local/lib/python3.8/dist-packages (1.21.3)
Requirement already satisfied: shapely in /usr/local/lib/python3.8/dist-packages (1.7.1)
Requirement already satisfied: rtree in /usr/local/lib/python3.8/dist-packages (0.9.7)
Requirement already satisfied: tk in /usr/local/lib/python3.8/dist-packages (0.1.0)
Requirement already satisfied: lxml in /usr/local/lib/python3.8/dist-packages (4.6.3)
Requirement already satisfied: cycler in /usr/lib/python3/dist-packages (0.10.0)
Requirement already satisfied: python-dateutil in /usr/local/lib/python3.8/dist-packages (2.8.2)
Requirement already satisfied: kiwisolver in /usr/local/lib/python3.8/dist-packages (1.3.2)
Requirement already satisfied: dill in /usr/local/lib/python3.8/dist-packages (0.3.4)
Requirement already satisfied: vispy in /usr/local/lib/python3.8/dist-packages (0.9.2)
Requirement already satisfied: pyopengl in /usr/local/lib/python3.8/dist-packages (3.1.5)
Requirement already satisfied: setuptools in /usr/local/lib/python3.8/dist-packages (58.3.0)
Requirement already satisfied: svg.path in /usr/local/lib/python3.8/dist-packages (4.1)
Requirement already satisfied: ortools in /usr/local/lib/python3.8/dist-packages (9.1.9490)
Requirement already satisfied: freetype-py in /usr/local/lib/python3.8/dist-packages (2.2.0)
Requirement already satisfied: fontTools in /usr/local/lib/python3.8/dist-packages (4.27.1)
Requirement already satisfied: rasterio in /usr/local/lib/python3.8/dist-packages (1.2.10)
Requirement already satisfied: ezdxf in /usr/local/lib/python3.8/dist-packages (0.17)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.8/dist-packages (3.4.3)
Requirement already satisfied: qrcode in /usr/local/lib/python3.8/dist-packages (7.3.1)
Requirement already satisfied: pyqt5 in /usr/local/lib/python3.8/dist-packages (5.15.5)
Requirement already satisfied: reportlab in /usr/local/lib/python3.8/dist-packages (3.6.2)
Requirement already satisfied: svglib in /usr/local/lib/python3.8/dist-packages (1.1.0)
Requirement already satisfied: pyserial in /usr/local/lib/python3.8/dist-packages (3.5)
Requirement already satisfied: testresources in /usr/local/lib/python3.8/dist-packages (2.0.1)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil) (1.14.0)
Requirement already satisfied: hsluv in /usr/local/lib/python3.8/dist-packages (from vispy) (5.0.2)
Requirement already satisfied: absl-py>=0.13 in /usr/local/lib/python3.8/dist-packages (from ortools) (0.15.0)
Requirement already satisfied: protobuf>=3.18.0 in /usr/local/lib/python3.8/dist-packages (from ortools) (3.19.0)
Requirement already satisfied: affine in /usr/local/lib/python3.8/dist-packages (from rasterio) (2.3.0)
Requirement already satisfied: cligj>=0.5 in /usr/local/lib/python3.8/dist-packages (from rasterio) (0.7.2)
Requirement already satisfied: click>=4.0 in /usr/lib/python3/dist-packages (from rasterio) (7.0)
Requirement already satisfied: click-plugins in /usr/local/lib/python3.8/dist-packages (from rasterio) (1.1.1)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from rasterio) (2019.11.28)
Requirement already satisfied: attrs in /usr/local/lib/python3.8/dist-packages (from rasterio) (21.2.0)
Requirement already satisfied: snuggs>=1.4.1 in /usr/local/lib/python3.8/dist-packages (from rasterio) (1.4.7)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.8/dist-packages (from ezdxf) (3.10.0.2)
Requirement already satisfied: pyparsing>=2.0.1 in /usr/lib/python3/dist-packages (from ezdxf) (2.4.6)
Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib) (7.0.0)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in /usr/local/lib/python3.8/dist-packages (from pyqt5) (12.9.0)
Requirement already satisfied: PyQt5-Qt5>=5.15.2 in /usr/local/lib/python3.8/dist-packages (from pyqt5) (5.15.2)
Requirement already satisfied: tinycss2>=0.6.0 in /usr/local/lib/python3.8/dist-packages (from svglib) (1.1.0)
Requirement already satisfied: cssselect2>=0.2.0 in /usr/local/lib/python3.8/dist-packages (from svglib) (0.4.1)
Requirement already satisfied: pbr>=1.8 in /usr/local/lib/python3.8/dist-packages (from testresources) (5.6.0)
Requirement already satisfied: webencodings in /usr/lib/python3/dist-packages (from cssselect2>=0.2.0->svglib) (0.5.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Comments (11)
-
-
reporter Ok, that actually worked, using vispy 0.7! Thanks!
Removing the new package:
sudo pip uninstall vispy Found existing installation: vispy 0.9.2 Uninstalling vispy-0.9.2: Would remove: /usr/local/lib/python3.8/dist-packages/vispy-0.9.2.dist-info/* /usr/local/lib/python3.8/dist-packages/vispy/*
and adding it back in:
sudo pip install vispy==0.7 Collecting vispy==0.7 Downloading vispy-0.7.0-cp38-cp38-manylinux2014_x86_64.whl (1.5 MB) |████████████████████████████████| 1.5 MB 1.9 MB/s Requirement already satisfied: numpy in /usr/local/lib/python3.8/dist-packages (from vispy==0.7) (1.21.3) Requirement already satisfied: hsluv in /usr/local/lib/python3.8/dist-packages (from vispy==0.7) (5.0.2) Requirement already satisfied: freetype-py in /usr/local/lib/python3.8/dist-packages (from vispy==0.7) (2.2.0) Requirement already satisfied: kiwisolver in /usr/local/lib/python3.8/dist-packages (from vispy==0.7) (1.3.2) Installing collected packages: vispy Successfully installed vispy-0.7.0
Although sudo may be unnecessary.
-
I faced the same issue with 8.994 on linux mint/Ubuntu 18.04 and installing vispy 0.7 fixed it for me too
-
- changed title to [Ubuntu] Fail to run from source - fixed for next version
-
Hi,
I tried to install “FlatCAM_beta_8.994_sources.zip“ in my new ubuntu 22.04 and had quite some issues. but finally I got there. I left below in case someone faces the same issues.
First, no idea about python so… well thanks internet i got all i needed.
1.USER@USER_LAPTOP:~/Downloads/FlatCAM_beta_8.994_sources$ make install_dependencies
installed a lot of things, so i thought it was going to be first time right. Wrong. Got below msg which in the end seems to be only a warning.
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
sudo: easy_install: opdracht niet gevonden
make: *** [Makefile:6: install_dependencies] Fout 1Tried to run FlatCam. USER@USER_LAPTOP:~/Downloads/FlatCAM_beta_8.994_sources$ python3 FlatCAM.py and got below
Traceback (most recent call last):
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/FlatCAM.py", line 6, in <module>
from app_Main import App
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/app_Main.py", line 47, in <module>
from appCommon.Common import LoudDict
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/appCommon/Common.py", line 88, in <module>
class LoudUniqueList(list, collections.MutableSequence):surfing internet I found, this post that helped me. From that point on, I started replacing collections by collections.abc every where there was an error by executing the program.
Second error:
USER@USER_LAPTOP:~/Downloads/FlatCAM_beta_8.994_sources$ python3 FlatCAM.py
Traceback (most recent call last):
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/FlatCAM.py", line 6, in <module>
from app_Main import App
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/app_Main.py", line 52, in <module>
from appDatabase import ToolsDB2
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/appDatabase.py", line 4, in <module>
from camlib import to_dict
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/camlib.py", line 54, in <module>
from appParsers.ParseDXF import *
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/appParsers/ParseDXF.py", line 10, in <module>
from ezdxf.math.vector import Vector as ezdxf_vector
ModuleNotFoundError: No module named 'ezdxf.math.vector'Which solution is in this very forum Link.
Third error:
USER@USER_LAPTOP:~/Downloads/FlatCAM_beta_8.994_sources$ python3 FlatCAM.py
Traceback (most recent call last):
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/FlatCAM.py", line 6, in <module>
from app_Main import App
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/app_Main.py", line 63, in <module>
from appObjects.ObjectCollection import *
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/appObjects/ObjectCollection.py", line 20, in <module>
from appObjects.FlatCAMCNCJob import CNCJobObject
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/appObjects/FlatCAMCNCJob.py", line 37, in <module>
import serial
ModuleNotFoundError: No module named 'serial'Which solution was: USER@USER_LAPTOP:~/Downloads/FlatCAM_beta_8.994_sources$ pip install pyserial
Fouth error:
USER@USER_LAPTOP:~/Downloads/FlatCAM_beta_8.994_sources$ python3 FlatCAM.py
Traceback (most recent call last):
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/FlatCAM.py", line 58, in <module>
VisPyPatches.apply_patches()
File "/home/USER/Downloads/FlatCAM_beta_8.994_sources/appGUI/VisPyPatches.py", line 32, in apply_patches
markers._marker_dict['++'] = cross_lines
AttributeError: module 'vispy.visuals.markers' has no attribute '_marker_dict'Which solution is in this very post.
Finally it runs
SER@USER_LAPTOP:~/Downloads/FlatCAM_beta_8.994_sources$ python3 FlatCAM.py
/usr/local/lib/python3.10/dist-packages/vispy/visuals/graphs/layouts/networkx_layout.py:10: UserWarning: Networkx not found, please install network to use its layouts
warnings.warn(
[INFO][MainThread] FlatCAM Starting...Best regards and thanks for the nice tool
-
With the latest pip (pip 22.3.1 on python 3.10), “pip install vispy==0.7.3” breaks:
vispy-0.7.3.tar.gz has inconsistent version: expected ‘0.7.3’, but metadata has '0.0.0'
You must therefore use:
pip install --use-deprecated=legacy-resolver --user vispy==0.7.3
but then you have
% pip freeze | grep vispy
vispy==0.0.0
which breaks other things, making all this rather complicated. Is it possible to upgrade to the latest vispy?
-
Hello,
The reason for those issues is that I have made some contributions to thevispy
package and some features are now invispy
and therefore FlatCAM no longer requires some of the patches that were made tovispy
.The development for FlatCAM beta (EVO) is on hold currently, I have some rather big changes in my life, once those will settle I will start allocating time again for this project.
Best regards,
Marius -
Take your time. You’ve given a lot already. Life has priority. Now the workaround is logged, people can continue using it, so nothing is blocked.
-
Is there any solution for this item, I have the same problem as above with installation Vispy and Vispy=7.0.0
In fact, I commented the 2 lines that request this command and Flatcam worked, but I don't know how this could damage the program.
-
@Azby Cxdw Did you tryed to generate and save DRILL’s job? It’s not works after i did all the steps you described. :(
-
@Stanislav Granovskiy , yes, it does work for me, you can run the tool from the console and post the error.
- Log in to comment
Hi,
The
easy_install
package is not needed, it is a leftover from the older versions of FlatCAM. In the next version will no longer be there.Regarding the
vispy
issue, if you are using theBeta
branch from this repository try to install an older version of this package, maybe 0.7.BTW, the latest versions of VisPy (0.9.1 and 0.9.2) bring a drastic performance degradation (more than 400% performance drop compared with 0.9.0).