iexbase / tron-api-python

A Python API for interacting with Tron (TRX)
https://tronapi-for-python.readthedocs.io
MIT License
166 stars 84 forks source link

problem in pip3 install tronapi #82

Open mahdilou99 opened 3 years ago

mahdilou99 commented 3 years ago

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 ?

mahdilou99 commented 3 years ago

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/

elaheh4 commented 3 years ago

i have this error too do you find a solution ?

ansmirnov commented 3 years ago

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
mahdilou99 commented 3 years ago

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

ansmirnov commented 3 years ago

@mahdilou99

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

mahdilou99 commented 3 years ago

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

ansmirnov commented 3 years ago

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
mahdilou99 commented 3 years ago

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

serderovsh commented 3 years ago

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

sap2me commented 2 years ago

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