whitews / FlowUtils

FlowUtils is a Python package containing various utility functions related to flow cytometry analysis, primarily focused on compensation and transformation tasks commonly used within the flow community.
https://flowutils.readthedocs.io
BSD 3-Clause "New" or "Revised" License
14 stars 8 forks source link

Flowutils installation on linux #7

Closed mdbz closed 3 years ago

mdbz commented 3 years ago

Hi Scott,

First of all thanks for putting together this package that makes data analysis very easy. All of my colleagues are using it on Mac. I run under a Windows with a VM on ubuntu and when I tried to install the package using python 3.8 I received this error message. I would be very grateful if you could help me out solving the issue, Thanks a million for your help as I'm very new to code.

Input python3.8 -m pip install flowutils

Result `Defaulting to user installation because normal site-packages is not writeable Collecting flowutils Using cached FlowUtils-0.9.2.tar.gz (11 kB) Requirement already satisfied: numpy>=1.7 in /home/customer/.local/lib/python3.8/site-packages (from flowutils) (1.20.2) Building wheels for collected packages: flowutils Building wheel for flowutils (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-w2f4txmj/flowutils_ce8ef7c331e14639a53a1273947fce47/setup.py'"'"'; file='"'"'/tmp/pip-install-w2f4txmj/flowutils_ce8ef7c331e14639a53a1273947fce47/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 /tmp/pip-wheel-yn3_98nc cwd: /tmp/pip-install-w2f4txmj/flowutils_ce8ef7c331e14639a53a1273947fce47/ Complete output (20 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/flowutils copying flowutils/compensate.py -> build/lib.linux-x86_64-3.8/flowutils copying flowutils/transforms.py -> build/lib.linux-x86_64-3.8/flowutils copying flowutils/init.py -> build/lib.linux-x86_64-3.8/flowutils running build_ext building 'flowutils.logicle_c' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/flowutils creating build/temp.linux-x86_64-3.8/flowutils/logicle_c_ext x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/customer/.local/lib/python3.8/site-packages/numpy/core/include -Iflowutils/logicle_c_ext -I/usr/include/python3.8 -c flowutils/logicle_c_ext/_logicle.c -o build/temp.linux-x86_64-3.8/flowutils/logicle_c_ext/_logicle.o -std=c99 flowutils/logicle_c_ext/_logicle.c:1:10: fatal error: Python.h: No such file or directory

include

        ^~~~~~~~~~

compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for flowutils Running setup.py clean for flowutils Failed to build flowutils Installing collected packages: flowutils Running setup.py install for flowutils ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-w2f4txmj/flowutils_ce8ef7c331e14639a53a1273947fce47/setup.py'"'"'; file='"'"'/tmp/pip-install-w2f4txmj/flowutils_ce8ef7c331e14639a53a1273947fce47/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-gepqjqt8/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/customer/.local/include/python3.8/flowutils cwd: /tmp/pip-install-w2f4txmj/flowutils_ce8ef7c331e14639a53a1273947fce47/ Complete output (20 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/flowutils copying flowutils/compensate.py -> build/lib.linux-x86_64-3.8/flowutils copying flowutils/transforms.py -> build/lib.linux-x86_64-3.8/flowutils copying flowutils/init.py -> build/lib.linux-x86_64-3.8/flowutils running build_ext building 'flowutils.logicle_c' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/flowutils creating build/temp.linux-x86_64-3.8/flowutils/logicle_c_ext x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/customer/.local/lib/python3.8/site-packages/numpy/core/include -Iflowutils/logicle_c_ext -I/usr/include/python3.8 -c flowutils/logicle_c_ext/_logicle.c -o build/temp.linux-x86_64-3.8/flowutils/logicle_c_ext/_logicle.o -std=c99 flowutils/logicle_c_ext/_logicle.c:1:10: fatal error: Python.h: No such file or directory

include

          ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------

ERROR: Command errored out with exit status 1: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-w2f4txmj/flowutils_ce8ef7c331e14639a53a1273947fce47/setup.py'"'"'; file='"'"'/tmp/pip-install-w2f4txmj/flowutils_ce8ef7c331e14639a53a1273947fce47/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-gepqjqt8/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/customer/.local/include/python3.8/flowutils Check the logs for full command output.`

whitews commented 3 years ago

This could be a couple things, but most likely you need to install the Python headers in Ubuntu. To install them, something like the following command (in a terminal) should work:

sudo apt install python3-dev

That package name of python3-dev might not be exactly right for your system, might be something like python3.8-dev.

mdbz commented 3 years ago

Indeed, that was what I needed after getting that package and few others ones it's working perfectly fine. Thank you.

On Sun, Apr 11, 2021, 12:05 Scott White @.***> wrote:

This could be a couple things, but most likely you need to install the Python headers in Ubuntu. To install them, something like the following command (in a terminal) should work:

sudo apt install python3-dev

That package name of python3-dev might not be exactly right for your system, might be something like python3.8-dev.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/whitews/FlowUtils/issues/7#issuecomment-817330961, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATT5ECC42Q46TFEUW5NKLATTIHCFFANCNFSM42XHPF4Q .