hsanjuan / dccpi

A simple, easy to use, NMRA Digital Command Control (DCC) Python implementation for Raspberry Pi
GNU General Public License v3.0
54 stars 13 forks source link

problem installing #6

Closed py-bot-py closed 5 years ago

py-bot-py commented 5 years ago

so im doing the pip install (sudo pip install dccpi) but everytime i do i get this error: Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-FxzZWj/dccpi/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-rPxJgN/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-FxzZWj/dccpi/

hsanjuan commented 5 years ago

It works here. I can't do much Command failed with error code 1 is not very useful. Aren't there any messages before?

py-bot-py commented 5 years ago

well this is the hole thing: The directory '/home/oliver/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/oliver/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting dccpi Downloading https://files.pythonhosted.org/packages/85/90/f9f4998fd844d421134357ad675cccf54f78ba6c5f0fcdbbc962328fddf3/dccpi-1.3.1.tar.gz (4.1MB) 100% |████████████████████████████████| 4.2MB 7.1MB/s Requirement already satisfied: bitstring in /usr/local/lib/python2.7/dist-packages (from dccpi) (3.1.5) Installing collected packages: dccpi Running setup.py install for dccpi ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-lXOkNs/dccpi/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-_6oB_y/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/dccpi copying dccpi/dcc_rpi_encoder.py -> build/lib.linux-x86_64-2.7/dccpi copying dccpi/dcc_packet_factory.py -> build/lib.linux-x86_64-2.7/dccpi copying dccpi/dcc_dummy_encoder.py -> build/lib.linux-x86_64-2.7/dccpi copying dccpi/init.py -> build/lib.linux-x86_64-2.7/dccpi copying dccpi/dcc_locomotive.py -> build/lib.linux-x86_64-2.7/dccpi copying dccpi/dcc_general_packet.py -> build/lib.linux-x86_64-2.7/dccpi copying dccpi/dcc_controller.py -> build/lib.linux-x86_64-2.7/dccpi copying dccpi/dcc_encoder.py -> build/lib.linux-x86_64-2.7/dccpi running build_ext building 'dcc_rpi_encoder_c' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/extensions x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-nbjU53/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c extensions/dcc_rpi_encoder_c.c -o build/temp.linux-x86_64-2.7/extensions/dcc_rpi_encoder_c.o extensions/dcc_rpi_encoder_c.c:24:10: fatal error: wiringPi.h: No such file or directory

include

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

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

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

hsanjuan commented 5 years ago

You need to install WiringPi, as mentioned here: https://github.com/hsanjuan/dccpi#software-requirements

py-bot-py commented 5 years ago

ok thank you