V3.2 compile hello, cryptography ?

jumjum123
Posts: 199
Joined: Mon Oct 17, 2016 3:11 pm

V3.2 compile hello, cryptography ?

Postby jumjum123 » Mon Jan 07, 2019 10:32 am

To get some first ideas about V3.2, tried to compile hello example and got this

Code: Select all

esp32@v12116:~/V3.2/esp-idf/examples/get-started/hello_world$ make
Toolchain path: /home/esp32/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a
Compiler version: 5.2.0
The following Python requirements are not satisfied:
cryptography>=2.1.4
Please refer to the Get Started section of the ESP-IDF Programming Guide for setting up the required packages. Alternatively, you can run "/usr/bin/python -m pip install --user -r /home/esp32/V3.2/esp-idf/requirements.txt" for resolving the issue.
Running python install as mentioned get this

Code: Select all

esp32@v12116:~/V3.2/esp-idf/examples/get-started/hello_world$ /usr/bin/python -m pip install --user -r /home/esp32/V3.2/esp-idf/requirements.txt
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from -r /home/esp32/V3.2/esp-idf/requirements.txt (line 4))
Requirement already satisfied (use --upgrade to upgrade): pyserial>=3.0 in /home/esp32/.local/lib/python2.7/site-packages (from -r /home/esp32/V3.2/esp-idf/requirements.txt (line 8))
Requirement already satisfied (use --upgrade to upgrade): future>=0.15.2 in /home/esp32/.local/lib/python2.7/site-packages (from -r /home/esp32/V3.2/esp-idf/requirements.txt (line 9))
Requirement already satisfied (use --upgrade to upgrade): cryptography>=2.1.4 in /home/esp32/.local/lib/python2.7/site-packages (from -r /home/esp32/V3.2/esp-idf/requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): pyparsing>=2.0.3 in /home/esp32/.local/lib/python2.7/site-packages (from -r /home/esp32/V3.2/esp-idf/requirements.txt (line 11))
Requirement already satisfied (use --upgrade to upgrade): idna>=2.1 in /home/esp32/.local/lib/python2.7/site-packages (from cryptography>=2.1.4->-r /home/esp32/V3.2/esp-idf/requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): asn1crypto>=0.21.0 in /home/esp32/.local/lib/python2.7/site-packages (from cryptography>=2.1.4->-r /home/esp32/V3.2/esp-idf/requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/lib/python2.7/dist-packages (from cryptography>=2.1.4->-r /home/esp32/V3.2/esp-idf/requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.7,!=1.11.3 in /home/esp32/.local/lib/python2.7/site-packages (from cryptography>=2.1.4->-r /home/esp32/V3.2/esp-idf/requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): pycparser in /home/esp32/.local/lib/python2.7/site-packages (from cffi>=1.7,!=1.11.3->cryptography>=2.1.4->-r /home/esp32/V3.2/esp-idf/requirements.txt (line 10))
Cleaning up...
Looks to me like having 2 different methods to recognize cryptography
Looking into site-pacckages I see folder for cryptography and cryptography-2.4.2-py2.7.egg-info
Any idea whats going wrong ?

jumjum123
Posts: 199
Joined: Mon Oct 17, 2016 3:11 pm

Re: V3.2 compile hello, cryptography ?

Postby jumjum123 » Sun Feb 10, 2019 7:47 pm

May be, this can help, I've to check viewtopic.php?f=13&t=7017&start=20
Since I didn't get any feedback, my quick and ugly solution up to now is to comment the check.
Couldn't recognize any restrictions (yet)

DATASKY
Posts: 1
Joined: Thu Jul 11, 2019 2:35 am

Re: V3.2 compile hello, cryptography ?

Postby DATASKY » Thu Jul 11, 2019 2:40 am

我找到了原因,应该是跟cryptography相关的依赖包没安装,可以通过下面的命令,来查找还有哪些依赖包没安装好
esp8266@esp8266-VirtualBox:~/Share/wifi_blue/my_app/esp-idf-template$ python2.7
Python 2.7.6 (default, Nov 12 2018, 20:00:40)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> line=click>=5.0;pkg_resources.require(line)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'click' is not defined
>>> line="click>=5.0";pkg_resources.require(line)
[Click 7.0 (/home/esp8266/.local/lib/python2.7/site-packages)]
>>>
>>> line="cryptography>=2.1.4";pkg_resources.require(line)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'ipaddress' distribution was not found and is required by cryptography
表示,ipaddress这个依赖包没安装
可以sudo python2.7 -m pip install ipaddress
然后再执行
esp8266@esp8266-VirtualBox:~/Share/wifi_blue/my_app/esp-idf-template$ python2.7
Python 2.7.6 (default, Nov 12 2018, 20:00:40)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> line="cryptography>=2.1.4";pkg_resources.require(line)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'enum34' distribution was not found and is required by cryptography
>>> line="cryptography>=2.1.4";pkg_resources.require(line)
[cryptography 2.7 (/home/esp8266/.local/lib/python2.7/site-packages), ipaddress 1.0.22 (/usr/local/lib/python2.7/dist-packages), enum34 1.1.6 (/usr/local/lib/python2.7/dist-packages), cffi 1.12.3 (/home/esp8266/.local/lib/python2.7/site-packages), six 1.12.0 (/usr/local/lib/python2.7/dist-packages), asn1crypto 0.24.0 (/home/esp8266/.local/lib/python2.7/site-packages), pycparser 2.19 (/home/esp8266/.local/lib/python2.7/site-packages)]
表示cryptography已经安装成功了
执行make,不会报依赖包的错误

Who is online

Users browsing this forum: No registered users and 42 guests