KaLeu
Hi I am running Lubuntu 16.04 and I tried to install the OpenPLC_Editor. When I type the command:
~/PLC-SPS/OpenPLC_Editor$ sudo -H ./ install.sh
I receive the following error message:
Downloading https://files.pythonhosted.org/packages/ff/59/d3f6d46aa1fd220d020bdd61e76ca51f6548c6ad6d24ddb614f4037cf49d/numpy-1.17.4.zip (6.4MB)
100% |████████████████████████████████| 6.4MB 31kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-5utpnj/numpy/setup.py", line 31, in <module>
raise RuntimeError("Python version >= 3.5 required.")
RuntimeError: Python version >= 3.5 required.

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-5utpnj/numpy/
You are using pip version 8.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

But I am running python 3.5.2
where is the problem ?

Thanks for your help

KaLeu
Quote 0 0
thiagoralves
The editor can only run on python 2.7. You shouldn't start the script as root (sudo -H).

edit: also, consider upgrading you pip since it looks pretty old.
pip2 install --upgrade pip


edit2: It looks like pip is still trying to install an invalid version of numpy on python 2.7. Just change this line on the installer script and it will work.

Change from:
pip2 install future zeroconf==0.19.1 numpy matplotlib==2.0.2 lxml pyro sslpsk

To:
pip2 install future zeroconf==0.19.1 numpy==1.16.5 matplotlib==2.0.2 lxml pyro sslpsk
Quote 0 0
KaLeu
Thank you very much for your prompt help
Quote 0 0
KaLeu
It work a little bit further, but then another error occurred with the following error message:


Collecting matplotlib==2.0.2
Downloading https://files.pythonhosted.org/packages/f5/f0/9da3ef24ea7eb0ccd12430a261b66eca36b924aeef06e17147f9f9d7d310/matplotlib-2.0.2.tar.gz (53.9MB)
|████████████████████████████████| 53.9MB 26kB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-Lg78Ms/matplotlib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-Lg78Ms/matplotlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-Lg78Ms/matplotlib/pip-egg-info
cwd: /tmp/pip-install-Lg78Ms/matplotlib/
Complete output (76 lines):
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
matplotlib: yes [2.0.2]
python: yes [2.7.12 (default, Oct 8 2019, 14:14:10) [GCC
5.4.0 20160609]]
platform: yes [linux2]

REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [not found. pip may install it below.]
six: yes [using six version 1.13.0]
dateutil: yes [dateutil was not found. It is required for date
axis support. pip/easy_install may attempt to
install it after matplotlib.]
functools32: yes [functools32 was not found. It is required
forPython versions prior to 3.2]
subprocess32: yes [subprocess32 was not found. It used for Python
versions prior to 3.2 to improves functionality on
Linux and OSX]
pytz: yes [pytz was not found. pip will attempt to install
it after matplotlib.]
cycler: yes [cycler was not found. pip will attempt to
install it after matplotlib.]
tornado: yes [tornado was not found. It is required for the
WebAgg backend. pip/easy_install may attempt to
install it after matplotlib.]
pyparsing: yes [pyparsing was not found. It is required for
mathtext support. pip/easy_install may attempt to
install it after matplotlib.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype2 (ft2build.h)
could not be found. You may need to install the
development package.]
png: yes [version 1.2.54]
qhull: yes [pkg-config information for 'qhull' could not be
found. Using local copy.]

OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: no [skipping due to configuration]
toolkits_tests: no [skipping due to configuration]

OPTIONAL BACKEND EXTENSIONS
macosx: no [Mac OS-X only]
qt5agg: no [PyQt5 not found]
qt4agg: no [PySide not found; PyQt4 not found]
gtk3agg: yes [installing, version 3.9.18]
gtk3cairo: yes [installing, version 3.9.18]
gtkagg: no [The C/C++ header for gtk (gtk/gtk.h) could not
be found. You may need to install the development
package.]
tkagg: yes [installing; run-time loading from Python Tcl /
Tk]
wxagg: yes [installing, version 3.0.2.0]
gtk: no [The C/C++ header for gtk (gtk/gtk.h) could not
be found. You may need to install the development
package.]
agg: yes [installing]
cairo: yes [installing, pycairo version 1.8.8]
windowing: no [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: yes [version 9.26]
latex: no
pdftops: yes [version 0.41.0]

OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]

============================================================================
* The following required packages can not be built:
* freetype
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Can you help me again ?

Thanks
Quote 0 0
thiagoralves
http://letmegooglethat.com/?q=*+The+following+required+packages+can+not+be+built%3A+*+freetype&l=1
Quote 0 0
KaLeu
Ok - that was easy.
Sorry for not checking properly.
After installing freetype I got another error:

File "/tmp/easy_install-XKr98W/numpy-1.17.4/setup.py", line 31, in <module>
os.remove('MANIFEST')
RuntimeError: Python version >= 3.5 required.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I think I'll give it up - this is to complicated for an average user.
Quote 0 0
thiagoralves
Use Windows, then all you have to do is double-click an .exe file and it will run. If you decide to run stuff on Linux, you gotta be prepared for hiccups.

PS: the error is complaining about numpy-1.17.4. Are you sure you changed the install script line to:
pip2 install future zeroconf==0.19.1 numpy==1.16.5 matplotlib==2.0.2 lxml pyro sslpsk

This must install numpy 1.16.5 which is compatible with python 2.7
Quote 0 0
KaLeu
Hi

sorry for beeing a little unpatient. I was too keen to run an explore the Editor. I am used to having a bit more work with linux, but usually I don't have to ask to many questions in a forum :-).
I am abroad an will try to install again when I am back home.
Thanks for beeing patient with me !

Stefan
Quote 0 0
KaLeu
Hi

double checked the install script. Settings are as you suggested but I am still getting the same error. Checked the  /tmp folder and found a file easy_install-Ohkc5L that contains numpy-1.17.4 zip. Could this be the reason ? When I try to install the routine uses cached files
Using cached https://files.pythonhosted.org/packages/01/7e/c9e4e33f2ec4e5193cd2df2b5b44af395de06814d5a2c0b7068c9d13d3e7/numpy-1.16.5-cp27-cp27mu-manylinux1_i686.whl
Can this be the reason ?

Thanks for your help

Cheers
Quote 0 0
thiagoralves
I believe it might be a problem with matplotlib dependencies. Perhaps it depends on numpy and it is getting the wrong version from it. Check the full error logs. Try an earlier version of matplotlib. Also, where are you installing this? I've seen this error before on ARM platforms. Usually on x86 all dependencies come pre-compiled and things are a lot easier.
Quote 0 0
KaLeu
Hi

I used matplotlib 2.0.0
the editor finally running

Thanks a lot for your patience.
Quote 0 0