ModuleNotFoundError: No module named 'yaml' on execute make update on filebeat

Hi everyone

I'm experiencing the following error while trying to do make update on filebeat source

[administratoruser@linux-centos-7-201901171514 filebeat]$ pwd
/home/administratoruser/go/src/github.com/elastic/beats/filebeat
[administratoruser@linux-centos-7-201901171514 filebeat]$ make update
mage update
Generated fields.yml for filebeat to /home/administratoruser/go/src/github.com/elastic/beats/filebeat/fields.yml
No fields files for module apache2
Generated fields.yml for filebeat to /home/administratoruser/go/src/github.com/elastic/beats/filebeat/fields.yml

The index pattern was created under /home/administratoruser/go/src/github.com/elastic/beats/filebeat/build/kibana/7/index-pattern/filebeat.json
Building filebeat.yml for linux/amd64
Building filebeat.reference.yml for linux/amd64
Building filebeat.docker.yml for linux/amd64
Generated fields.yml for filebeat to /home/administratoruser/go/src/github.com/elastic/beats/filebeat/build/fields/fields.all.yml
Traceback (most recent call last):
File "/home/administratoruser/go/src/github.com/elastic/beats/libbeat/scripts/generate_fields_docs.py", line 5, in
import yaml
ModuleNotFoundError: No module named 'yaml'
Error: running "/home/administratoruser/go/src/github.com/elastic/beats/build/ve/linux/bin/python /home/administratoruser/go/src/github.com/elastic/beats/libbeat/scripts/generate_fields_docs.py build/fields/fields.all.yml filebeat /home/administratoruser/go/src/github.com/elastic/beats --output_path /home/administratoruser/go/src/github.com/elastic/beats/filebeat" failed with exit code 1
make: *** [update] Error 1
[administratoruser@linux-centos-7-201901171514 filebeat]$

This is my python installation

[administratoruser@linux-centos-7-201901171514 filebeat]$ python -m pip install pyyaml
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already satisfied: pyyaml in /usr/lib64/python2.7/site-packages (3.10)
[administratoruser@linux-centos-7-201901171514 filebeat]$ python --version
Python 2.7.5
[administratoruser@linux-centos-7-201901171514 filebeat]$ python3.6 -m pip install pyyaml
Requirement already satisfied: pyyaml in /usr/lib64/python3.6/site-packages (3.13)
[administratoruser@linux-centos-7-201901171514 filebeat]$ python3.6 --version
Python 3.6.7
[administratoruser@linux-centos-7-201901171514 filebeat]$

any help will be welcome

In the effort of trying to follow this guide: Contributing to Beats | Beats Developer Guide [master] | Elastic

i've switched to windows 10 with this configuration

C:\Users\test-user-win-10\go\src\github.com\elastic\beats\filebeat>python --version
Python 3.7.2

C:\Users\test-user-win-10\go\src\github.com\elastic\beats\filebeat>go version
go version go1.11.5 windows/amd64

C:\Users\test-user-win-10\go\src\github.com\elastic\beats\filebeat>virtualenv --version
16.3.0

C:\Users\test-user-win-10\go\src\github.com\elastic\beats\filebeat>

and i still get: ModuleNotFoundError: No module named 'yaml'

C:\Users\test-user-win-10\go\src\github.com\elastic\beats\filebeat>pip install pyyaml
Collecting pyyaml
Downloading https://files.pythonhosted.org/packages/bf/96/d02ef8e1f3073e07ffdc240444e5041f403f29c0775f9f1653f18221082f/PyYAML-3.13-cp37-cp37m-win_amd64.whl (206kB)
100% |████████████████████████████████| 215kB 3.3MB/s
Installing collected packages: pyyaml
Successfully installed pyyaml-3.13

C:\Users\test-user-win-10\go\src\github.com\elastic\beats\filebeat>make update
C:\Users\test-user-win-10\go\bin\mage.exe
Generated fields.yml for filebeat to C:\Users\test-user-win-10\go\src\github.com\elastic\beats\filebeat\fields.yml
No fields files for module apache2
Generated fields.yml for filebeat to C:\Users\test-user-win-10\go\src\github.com\elastic\beats\filebeat\fields.yml

The index pattern was created under C:\Users\test-user-win-10\go\src\github.com\elastic\beats\filebeat\build\kibana\7\index-pattern\filebeat.json
Building filebeat.yml for linux/amd64
Building filebeat.reference.yml for linux/amd64
Building filebeat.docker.yml for linux/amd64
Generated fields.yml for filebeat to C:\Users\test-user-win-10\go\src\github.com\elastic\beats\filebeat\build\fields\fields.all.yml
Traceback (most recent call last):
File "C:\Users\test-user-win-10\go\src\github.com\elastic\beats\libbeat\scripts\generate_fields_docs.py", line 5, in
import yaml
ModuleNotFoundError: No module named 'yaml'
Error: running "C:\Users\test-user-win-10\go\src\github.com\elastic\beats\build\ve\windows\Scripts\python.exe C:\Users\test-user-win-10\go\src\github.com\elastic\beats\libbeat\scripts\generate_fields_docs.py build/fields/fields.all.yml filebeat C:\Users\test-user-win-10\go\src\github.com\elastic\beats --output_path C:\Users\test-user-win-10\go\src\github.com\elastic\beats\filebeat" failed with exit code 1

So eny help would be appreciated

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.