Installation Error COMPAS with PIP


#1

Hi,
when I tried to install COMPAS with pip (pip install COMPAS) I got always the same error message (see below) and the Installation stoped at this point.
What can I do, to overcome this issue?

Thx for help :slight_smile:

************************** Installation ERROR message ***********************************************
C:\Users\vivianerogenmoser>pip install COMPAS
Collecting COMPAS
Using cached https://files.pythonhosted.org/packages/60/d7/0c2a2a4bb68d6cda24ae9dea8f97ef57941fcb82232df31b301dfc071f28/COMPAS-0.4.23-py2.py3-none-any.whl
Requirement already satisfied: cython in c:\users\vivianerogenmoser\appdata\local\programs\python\python37\lib\site-packages (from COMPAS) (0.29.6)
Requirement already satisfied: scipy in c:\users\vivianerogenmoser\appdata\roaming\python\python37\site-packages (from COMPAS) (1.2.1)
Requirement already satisfied: planarity in c:\users\vivianerogenmoser\appdata\local\programs\python\python37\lib\site-packages (from COMPAS) (0.4.1)
Requirement already satisfied: matplotlib in c:\users\vivianerogenmoser\appdata\roaming\python\python37\site-packages (from COMPAS) (3.0.3)
Collecting numba (from COMPAS)
Using cached https://files.pythonhosted.org/packages/e6/45/d1c15c431d3361f074a25dcb278e79367b34ee44b6ca1bc2b7992e2382aa/numba-0.42.1.tar.gz
Requirement already satisfied: pillow in c:\users\vivianerogenmoser\appdata\local\programs\python\python37\lib\site-packages (from COMPAS) (5.4.1)
Requirement already satisfied: sympy in c:\users\vivianerogenmoser\appdata\roaming\python\python37\site-packages (from COMPAS) (1.3)
Requirement already satisfied: networkx in c:\users\vivianerogenmoser\appdata\local\programs\python\python37\lib\site-packages (from COMPAS) (2.2)
Requirement already satisfied: numpy in c:\users\vivianerogenmoser\appdata\roaming\python\python37\site-packages (from COMPAS) (1.16.2)
Requirement already satisfied: setuptools in c:\users\vivianerogenmoser\appdata\local\programs\python\python37\lib\site-packages (from planarity->COMPAS) (40.8.0)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\vivianerogenmoser\appdata\roaming\python\python37\site-packages (from matplotlib->COMPAS) (2.8.0)
Requirement already satisfied: cycler>=0.10 in c:\users\vivianerogenmoser\appdata\roaming\python\python37\site-packages (from matplotlib->COMPAS) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\vivianerogenmoser\appdata\roaming\python\python37\site-packages (from matplotlib->COMPAS) (2.3.1)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\vivianerogenmoser\appdata\roaming\python\python37\site-packages (from matplotlib->COMPAS) (1.0.1)
Requirement already satisfied: llvmlite>=0.27.0dev0 in c:\users\vivianerogenmoser\appdata\local\programs\python\python37\lib\site-packages (from numba->COMPAS) (0.27.0)
Requirement already satisfied: mpmath>=0.19 in c:\users\vivianerogenmoser\appdata\roaming\python\python37\site-packages (from sympy->COMPAS) (1.1.0)
Requirement already satisfied: decorator>=4.3.0 in c:\users\vivianerogenmoser\appdata\roaming\python\python37\site-packages (from networkx->COMPAS) (4.3.2)
Requirement already satisfied: six>=1.5 in c:\users\vivianerogenmoser\appdata\roaming\python\python37\site-packages (from python-dateutil>=2.1->matplotlib->COMPAS) (1.12.0)
Building wheels for collected packages: numba
Building wheel for numba (setup.py) … error
Complete output from command c:\users\vivianerogenmoser\appdata\local\programs\python\python37\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\VIVIAN~1\AppData\Local\Temp\pip-install-mdyzeuz3\numba\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 C:\Users\VIVIAN~1\AppData\Local\Temp\pip-wheel-o60ww_va --python-tag cp37:
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\VIVIAN~1\AppData\Local\Temp\pip-install-mdyzeuz3\numba\setup.py”, line 359, in
metadata[‘ext_modules’] = get_ext_modules()
File “C:\Users\VIVIAN~1\AppData\Local\Temp\pip-install-mdyzeuz3\numba\setup.py”, line 96, in get_ext_modules
import numpy.distutils.misc_util as np_misc
File “C:\Users\vivianerogenmoser\AppData\Roaming\Python\Python37\site-packages\numpy_init_.py”, line 142, in
from . import core
File “C:\Users\vivianerogenmoser\AppData\Roaming\Python\Python37\site-packages\numpy\core_init_.py”, line 23, in
WinDLL(os.path.abspath(filename))
File “c:\users\vivianerogenmoser\appdata\local\programs\python\python37\lib\ctypes_init_.py”, line 356, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application


Failed building wheel for numba
Running setup.py clean for numba
Complete output from command c:\users\vivianerogenmoser\appdata\local\programs\python\python37\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\VIVIAN~1\AppData\Local\Temp\pip-install-mdyzeuz3\numba\setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” clean --all:
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\VIVIAN~1\AppData\Local\Temp\pip-install-mdyzeuz3\numba\setup.py”, line 359, in
metadata[‘ext_modules’] = get_ext_modules()
File “C:\Users\VIVIAN~1\AppData\Local\Temp\pip-install-mdyzeuz3\numba\setup.py”, line 96, in get_ext_modules
import numpy.distutils.misc_util as np_misc
File “C:\Users\vivianerogenmoser\AppData\Roaming\Python\Python37\site-packages\numpy_init_.py”, line 142, in
from . import core
File “C:\Users\vivianerogenmoser\AppData\Roaming\Python\Python37\site-packages\numpy\core_init_.py”, line 23, in
WinDLL(os.path.abspath(filename))
File “c:\users\vivianerogenmoser\appdata\local\programs\python\python37\lib\ctypes_init_.py”, line 356, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application


Failed cleaning build dir for numba
Failed to build numba
Installing collected packages: numba, COMPAS
Running setup.py install for numba … error
Complete output from command c:\users\vivianerogenmoser\appdata\local\programs\python\python37\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\VIVIAN~1\AppData\Local\Temp\pip-install-mdyzeuz3\numba\setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record C:\Users\VIVIAN~1\AppData\Local\Temp\pip-record-9o8onfp4\install-record.txt --single-version-externally-managed --compile:
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\VIVIAN~1\AppData\Local\Temp\pip-install-mdyzeuz3\numba\setup.py”, line 359, in
metadata[‘ext_modules’] = get_ext_modules()
File “C:\Users\VIVIAN~1\AppData\Local\Temp\pip-install-mdyzeuz3\numba\setup.py”, line 96, in get_ext_modules
import numpy.distutils.misc_util as np_misc
File “C:\Users\vivianerogenmoser\AppData\Roaming\Python\Python37\site-packages\numpy_init_.py”, line 142, in
from . import core
File “C:\Users\vivianerogenmoser\AppData\Roaming\Python\Python37\site-packages\numpy\core_init_.py”, line 23, in
WinDLL(os.path.abspath(filename))
File “c:\users\vivianerogenmoser\appdata\local\programs\python\python37\lib\ctypes_init_.py”, line 356, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

----------------------------------------

Command “c:\users\vivianerogenmoser\appdata\local\programs\python\python37\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\VIVIAN~1\AppData\Local\Temp\pip-install-mdyzeuz3\numba\setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record C:\Users\VIVIAN~1\AppData\Local\Temp\pip-record-9o8onfp4\install-record.txt --single-version-externally-managed --compile” failed with error code 1 in C:\Users\VIVIAN~1\AppData\Local\Temp\pip-install-mdyzeuz3\numba\

C:\Users\vivianerogenmoser>


#2

It is recommended to install compas using Anaconda instead of pip. Especially on Windows, because installing all required dependencies is very hard otherwise.


#3

can you let us know if installing through conda solved the problem?
thanks…


#4

I think COMPAS is now installed (see screenshot)

!! :smiley:

Sry for taking so long to answer… I had have many installation errors with using anaconda 3.7 (for python 3.7).
I’ve now installed COMPAS by using Aanaconda 2.7 (for python 2.7) and it finally works!
But importing the module compas (compas_rhino, etc.) just works through specific Anaconda Prompt…Unfortunatly importing the compas modules is still not working in the default Command Prompt !

Is this a problem? Or do you think that everything would work fine now?

Thank you for you’re support!


#5

hi,

that is indeed not a problem (recent versions of Anaconda no longer register their default Python on the PATH). if you want to use use Python/COMPAS from the command line, use the Anaconda Prompt.

in an editor or in Rhino/Blender this will not be a problem in any case. see https://compas-dev.github.io/main/environments.html for more info.

note that we recently updated the version specifications of the dependencies of COMPAS and that some of the installation problems might be resolved since version 0.5. also, you don’t have to install Anaconda 2 to use Python 2.7. you can just create a new environment and specify the version of Python you wish to use…

and finally, if you encountered undocumented installation issues, please let us know, so we can fix them!

best,
tom