Closed shahab5 closed 8 years ago
I am following the simplelog tutorial at http://yottadocs.mbed.com/tutorial/tutorial.html
Things I have tried,
Thanks
Your version of the requests
package is too old. Run pip install -U requests
first. (yotta requires requests>=2.4.1, which is specified in its setup.py, so this should have been updated when yotta was installed!)
@autopulated Thanks for reply.Pip says its upto date.
pip install -U requests Requirement already up-to-date: requests in /usr/lib/python2.7/site-packages
ah I misread the version in your error message – you do have >=2.4.1, but still only version 2.6.2 (the latest is 2.9.1).
So possibly this is another setuptools issue – It's worth trying installing the latest version of that (pip install -U setuptools
), and also updating to the latest yotta, which doesn't use pgk_resources any more when running commands (pip install -U yotta
).
@autopulated Updated pip using
dnf install python3-pip
pip install -U setuptools
Collecting setuptools Using cached setuptools-20.7.0-py2.py3-none-any.whl Installing collected packages: setuptools Found existing installation: setuptools 12.0.3 Uninstalling setuptools-12.0.3: Successfully uninstalled setuptools-12.0.3 Successfully installed setuptools-20.7.0
Got a different Error installing yotta,
pip install -U yotta
Collecting yotta Downloading yotta-0.16.3.tar.gz (128kB) 100% |████████████████████████████████| 133kB 202kB/s Requirement already up-to-date: semantic-version<3,>=2.3.1 in /usr/lib/python3.4/site-packages (from yotta) Requirement already up-to-date: requests[security]<3,>=2.4.3 in /usr/lib/python3.4/site-packages (from yotta) Requirement already up-to-date: certifi>=2016.2.28 in /usr/lib/python3.4/site-packages (from yotta) Collecting PyGithub<2,>=1.25 (from yotta) Using cached PyGithub-1.26.0.tar.gz Requirement already up-to-date: colorama<0.4,>=0.3 in /usr/lib/python3.4/site-packages (from yotta) Requirement already up-to-date: hgapi<2,>=1.7 in /usr/lib/python3.4/site-packages (from yotta) Collecting Jinja2<3,>=2.7.0 (from yotta) Using cached Jinja2-2.8-py2.py3-none-any.whl Collecting cryptography>=0.8 (from yotta) Using cached cryptography-1.3.1.tar.gz Collecting PyJWT<2.0,>=1.0 (from yotta) Using cached PyJWT-1.4.0-py2.py3-none-any.whl Collecting pathlib<1.1,>=1.0.1 (from yotta) Using cached pathlib-1.0.1.tar.gz Collecting jsonschema<3.0,>=2.4.0 (from yotta) Using cached jsonschema-2.5.1-py2.py3-none-any.whl Collecting argcomplete<2.0,>=0.8.0 (from yotta) Using cached argcomplete-1.1.1-py2.py3-none-any.whl Collecting mbed-test-wrapper<2.0.0,>=0.0.3 (from yotta) Using cached mbed_test_wrapper-1.0.0.tar.gz Collecting valinor<1.0,>=0.0.0 (from yotta) Using cached valinor-0.0.15.tar.gz Collecting intelhex<3.0,>=2.0 (from yotta) Using cached intelhex-2.1-py2.py3-none-any.whl Collecting jsonpointer<2.0,>=1.9 (from yotta) Using cached jsonpointer-1.10.tar.gz Requirement already up-to-date: pyasn1 in /usr/lib/python3.4/site-packages (from requests[security]<3,>=2.4.3->yotta) Collecting ndg-httpsclient (from requests[security]<3,>=2.4.3->yotta) Using cached ndg_httpsclient-0.4.0.tar.gz Collecting pyOpenSSL>=0.13 (from requests[security]<3,>=2.4.3->yotta) Using cached pyOpenSSL-16.0.0-py2.py3-none-any.whl Requirement already up-to-date: MarkupSafe in /usr/lib/python3.4/site-packages (from Jinja2<3,>=2.7.0->yotta) Requirement already up-to-date: idna>=2.0 in /usr/lib/python3.4/site-packages (from cryptography>=0.8->yotta) Collecting six>=1.4.1 (from cryptography>=0.8->yotta) Using cached six-1.10.0-py2.py3-none-any.whl Requirement already up-to-date: setuptools>=11.3 in /usr/lib/python3.4/site-packages (from cryptography>=0.8->yotta) Collecting cffi>=1.4.1 (from cryptography>=0.8->yotta) Using cached cffi-1.5.2.tar.gz Requirement already up-to-date: pyyaml<4,>=3 in /usr/lib/python3.4/site-packages (from valinor<1.0,>=0.0.0->yotta) Collecting pyOCD<1.0,>=0.3 (from valinor<1.0,>=0.0.0->yotta) Using cached pyOCD-0.7.0.zip Collecting project-generator<0.9.0,>=0.8.0 (from valinor<1.0,>=0.0.0->yotta) Using cached project_generator-0.8.14.zip Collecting pyelftools==0.23 (from valinor<1.0,>=0.0.0->yotta) Using cached pyelftools-0.23.tar.gz Requirement already up-to-date: pycparser in /usr/lib/python3.4/site-packages (from cffi>=1.4.1->cryptography>=0.8->yotta) Collecting enum34 (from pyOCD<1.0,>=0.3->valinor<1.0,>=0.0.0->yotta) Using cached enum34-1.1.3-py2.py3-none-any.whl Collecting pyusb>=1.0.0b2 (from pyOCD<1.0,>=0.3->valinor<1.0,>=0.0.0->yotta) Using cached pyusb-1.0.0rc1.tar.gz Collecting argparse (from project-generator<0.9.0,>=0.8.0->valinor<1.0,>=0.0.0->yotta) Using cached argparse-1.4.0-py2.py3-none-any.whl Collecting xmltodict (from project-generator<0.9.0,>=0.8.0->valinor<1.0,>=0.0.0->yotta) Using cached xmltodict-0.10.1.tar.gz Collecting project-generator-definitions<0.3.0,>=0.2.2 (from project-generator<0.9.0,>=0.8.0->valinor<1.0,>=0.0.0->yotta) Using cached project_generator_definitions-0.2.12.zip Installing collected packages: PyGithub, Jinja2, six, cffi, cryptography, PyJWT, pathlib, jsonschema, argcomplete, mbed-test-wrapper, intelhex, enum34, pyusb, pyOCD, argparse, xmltodict, project-generator-definitions, project-generator, pyelftools, valinor, jsonpointer, yotta, pyOpenSSL, ndg-httpsclient Found existing installation: PyGithub 1.25.2 Uninstalling PyGithub-1.25.2: Successfully uninstalled PyGithub-1.25.2 Running setup.py install for PyGithub ... done Found existing installation: Jinja2 2.7.3 Uninstalling Jinja2-2.7.3: Successfully uninstalled Jinja2-2.7.3 Found existing installation: six 1.9.0 Uninstalling six-1.9.0: Successfully uninstalled six-1.9.0 Running setup.py install for cffi ... error Complete output from command /bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-la32wpnl/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-ce2zv5c3-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib.linux-i686-3.4 creating build/lib.linux-i686-3.4/cffi copying cffi/recompiler.py -> build/lib.linux-i686-3.4/cffi copying cffi/verifier.py -> build/lib.linux-i686-3.4/cffi copying cffi/cffi_opcode.py -> build/lib.linux-i686-3.4/cffi copying cffi/setuptools_ext.py -> build/lib.linux-i686-3.4/cffi copying cffi/init.py -> build/lib.linux-i686-3.4/cffi copying cffi/lock.py -> build/lib.linux-i686-3.4/cffi copying cffi/api.py -> build/lib.linux-i686-3.4/cffi copying cffi/gc_weakref.py -> build/lib.linux-i686-3.4/cffi copying cffi/vengine_gen.py -> build/lib.linux-i686-3.4/cffi copying cffi/ffiplatform.py -> build/lib.linux-i686-3.4/cffi copying cffi/cparser.py -> build/lib.linux-i686-3.4/cffi copying cffi/backend_ctypes.py -> build/lib.linux-i686-3.4/cffi copying cffi/commontypes.py -> build/lib.linux-i686-3.4/cffi copying cffi/model.py -> build/lib.linux-i686-3.4/cffi copying cffi/vengine_cpy.py -> build/lib.linux-i686-3.4/cffi copying cffi/_cffi_include.h -> build/lib.linux-i686-3.4/cffi copying cffi/parse_c_type.h -> build/lib.linux-i686-3.4/cffi copying cffi/_embedding.h -> build/lib.linux-i686-3.4/cffi running build_ext building '_cffi_backend' extension creating build/temp.linux-i686-3.4 creating build/temp.linux-i686-3.4/c gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DUSE__THREAD -I/usr/include/python3.4m -c c/_cffi_backend.c -o build/temp.linux-i686-3.4/c/_cffi_backend.o c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-la32wpnl/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-ce2zv5c3-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-la32wpnl/cffi/
How to remove the existing yotta (0.15.2),
pip uninstall yotta
Cannot uninstall requirement yotta, not installed
But yotta command exists.
which yotta
will tell you where the yotta that's being run is:
It's possible that you have two separate python installations – python 2, and python 3. I'm not sure how Fedora handles this, but you might have separate pip2 and pip3 commands for installing/uninstalling programs for each of them.
The installation is failing because binaries aren't available for your platform, and you're missing the python development headers needed to compile the cffi module. I think def install python3-devel
should install them.
Thanks it worked!!!
pip2 uninstall yotta
removed existing yotta
Installed development headers and yotta using,
dnf install python3-devel
pip install -U yotta
yotta build