StorjOld / dataserv-client

Client for storing and auditing data.
http://storj.io
MIT License
56 stars 24 forks source link

Python.h: No such file #171

Closed vindicatorr closed 8 years ago

vindicatorr commented 8 years ago

Ubuntu 15.10 (clean install)

$ sudo apt-get install python3-pip
$ sudo pip3 install dataserv-client
creating build/temp.linux-x86_64-3.5/psutil

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_VERSION=321 -I/usr/include/python3.5m -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-3.5/psutil/_psutil_linux.o

psutil/_psutil_linux.c:12:20: fatal error: Python.h: No such file or directory

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
littleskunk commented 8 years ago

please install python3-dev and gcc

vindicatorr commented 8 years ago
$ apt-cache policy python-dev gcc
python-dev:
  Installed: 2.7.9-1
  Candidate: 2.7.9-1
  Version table:
 *** 2.7.9-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status
gcc:
  Installed: 4:5.2.1-3ubuntu1
  Candidate: 4:5.2.1-3ubuntu1
  Version table:
 *** 4:5.2.1-3ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status
littleskunk commented 8 years ago

sorry my fault. python3-dev

vindicatorr commented 8 years ago
$ apt-cache policy python3-dev
python3-dev:
  Installed: 3.4.3-4ubuntu1
  Candidate: 3.4.3-4ubuntu1
  Version table:
 *** 3.4.3-4ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status
vindicatorr commented 8 years ago
$ locate Python.h
/usr/include/python2.7/Python.h
/usr/include/python3.4m/Python.h
littleskunk commented 8 years ago

I setup ubuntu and i get the same exception with python3. Quick workaround. Use python2 as long as i am looking for the reason.

littleskunk commented 8 years ago

Looks like a bug. pip3 is version 3.5 but python3-dev is version 3.4.

install python3.5-dev and try again.

vindicatorr commented 8 years ago

Success:

Running setup.py install for pycoin

    Installing bu script to /usr/local/bin
    Installing cache_tx script to /usr/local/bin
    Installing fetch_unspent script to /usr/local/bin
    Installing spend script to /usr/local/bin
    Installing genwallet script to /usr/local/bin
    Installing block script to /usr/local/bin
    Installing ku script to /usr/local/bin
    Installing tx script to /usr/local/bin
Successfully installed psutil storjcore pycrypto pycoin ecdsa
Cleaning up...
littleskunk commented 8 years ago

Thx for reporting the bug. I added install introduction for python3-dev and gcc. This will not solve the python version missmatch but it is needed for psutil anyway.

I close this bug for now and i hope ubuntu will fix the version missmatch soon.