iexbase/tron-api-python

problem in pip3 install tronapi

mahdilou99 opened this issue · 10 comments

hi
when i run pip3 install tronapi i have this error

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-sazbbhmf/cytoolz/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-4at3hdbj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-sazbbhmf/cytoolz/

what is problem ?

building 'cytoolz.dicttoolz' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/cytoolz
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.6m -c cytoolz/dicttoolz.c -o build/temp.linux-x86_64-3.6/cytoolz/dicttoolz.o
cytoolz/dicttoolz.c:17:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1

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

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-586ukv17/cytoolz/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-ouf9ljji-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-586ukv17/cytoolz/

i have this error too
do you find a solution ?

Do you have the Python header files installed?

Try running the command (for CentOS):

yum install python-devel

Or for Debian/Ubuntu:

apt-get install python-dev

@ansmirnov
CentOS Linux 8 - AppStream 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository 'appstream':

@mahdilou99

It looks like a network problem. DNS is not configured correctly.

Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 16 kB 00:00

  • EA4: 93.115.203.100
  • cpanel-addons-production-feed: 93.115.203.100
  • cpanel-plugins: 93.115.203.100
  • base: centosmirror.netcup.net
  • epel: ftp.plusline.net
  • extras: mirror.checkdomain.de
  • updates: mirror.checkdomain.de
    EA4 | 2.9 kB 00:00
    cpanel-addons-production-feed | 2.9 kB 00:00
    cpanel-plugins | 2.9 kB 00:00
    base | 3.6 kB 00:00
    epel | 4.7 kB 00:00
    extras | 2.9 kB 00:00
    mysql-connectors-community | 2.6 kB 00:00
    mysql-tools-community | 2.6 kB 00:00
    mysql57-community | 2.6 kB 00:00
    updates | 2.9 kB 00:00
    (1/2): epel/x86_64/updateinfo | 1.0 MB 00:00
    (2/2): epel/x86_64/primary_db | 6.9 MB 00:00
    Package python-devel-2.7.5-90.el7.x86_64 already installed and latest version
    Nothing to do
    @ansmirnov

You have installed python-devel version 2.7 but you are using pip version 3.6.

Try run the following command and install the correct version of python-devel.

yum search python-devel

@ansmirnov thanks
yum install python3-devel
worked and install good

Not enough time, work with the library, we will soon restore work

If sudo apt-get install python3-dev does not solved this problem you can try sudo apt-get install build-essential it helped me.