[Ubuntu] Fail to run from source

Issue #538 new
Andre Lewis created an issue

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 (3)

  1. Marius Stanciu

    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 the Beta 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).

  2. Andre Lewis 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.

  3. Anish Mangal

    I faced the same issue with 8.994 on linux mint/Ubuntu 18.04 and installing vispy 0.7 fixed it for me too

  4. Log in to comment