1

Collecting Orange

Downloading https://files.pythonhosted.org/packages/43/61/29c81c53504fb4c774eaec5218ca39f5d2625a61f0f6a52c61097be17f1c/Orange-2.7.8.tar.gz (15.0MB)
100% |████████████████████████████████| 15.0MB 1.8MB/s 
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-gz6v8uk6/Orange/setup.py", line 261
    except OSError, ex:
                  ^
SyntaxError: invalid syntax

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-gz6v8uk6/Orange/

please help me to solve this.Thanks in advance!

nishant
  • 2,526
  • 1
  • 13
  • 19
thaingi
  • 29
  • 5
  • did u try doing `sudo` ? – Vikas Yadav Jan 08 '19 at 05:15
  • 2
    @thaingi Did you use `pip install orange3` – Vishnudev Krishnadas Jan 08 '19 at 05:16
  • I use sudo.When pip install orange3,fastTSNE/quad_tree.c:28:20: fatal error: Python.h: No such file or directory #include "Python.h" ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 – thaingi Jan 08 '19 at 05:26
  • 1
    I've used the command `pip3 install orange3` and works. – Kellsens Jun 19 '19 at 02:47
  • @thaingi That error is easy to solve, just install Python development packages. Python.h is a header file in Python source code in such packages. Apparently Orange 3 needs to compile some C extensions and it needs to have Python source code for this. – LetMeSOThat4U Jul 02 '20 at 11:06
  • @thaingi On Debian/Ubuntu that would be something like `apt build-dep python`, or see on the web what packages are required to compile Python from source code and install those. – LetMeSOThat4U Jul 02 '20 at 11:07

2 Answers2

1

It happened to me and it was a version problem. This procedure solved the issue:

pip3 install --upgrade pip
python3 -m pip install --upgrade setuptools
pip3 install orange3
Prox
  • 41
  • 1
  • 4
0

Some years ago, Python 3 has changed how this expression should be written.

It changed to except OSError as e. Source: Python : except OSError, e:

An alternative to getting rid of it is to install orange3 instead of orange.