question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to build wheel pyhcl, missing ply.lex

See original GitHub issue

`mkvirtualenv foo-bar-fudge-tf New python executable in /home/matthbak/Apps/virtualenvs/foo-bar-fudge-tf/bin/python Installing setuptools, pip, wheel…done. virtualenvwrapper.user_scripts creating /home/matthbak/Apps/virtualenvs/foo-bar-fudge-tf/bin/predeactivate virtualenvwrapper.user_scripts creating /home/matthbak/Apps/virtualenvs/foo-bar-fudge-tf/bin/postdeactivate virtualenvwrapper.user_scripts creating /home/matthbak/Apps/virtualenvs/foo-bar-fudge-tf/bin/preactivate virtualenvwrapper.user_scripts creating /home/matthbak/Apps/virtualenvs/foo-bar-fudge-tf/bin/postactivate virtualenvwrapper.user_scripts creating /home/matthbak/Apps/virtualenvs/foo-bar-fudge-tf/bin/get_env_details (foo-bar-fudge-tf) (0) matthbak@matthbak-laptop ~/Projects/cpsre/terraform-modules/foo-bar-fudge-tf $ pip install pyhcl 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. Looking in indexes: … Collecting pyhcl Downloading https://files.pythonhosted.org/packages/8c/90/411f698550155532a1375d0367da08c2d0ecc922d4c0362bd4236893238b/pyhcl-0.3.12.tar.gz Collecting ply<4,>=3.8 (from pyhcl) Using cached https://files.pythonhosted.org/packages/a3/58/35da89ee790598a0700ea49b2a66594140f44dec458c07e8e3d4979137fc/ply-3.11-py2.py3-none-any.whl Building wheels for collected packages: pyhcl Building wheel for pyhcl (setup.py) … error Complete output from command /home/matthbak/Apps/virtualenvs/foo-bar-fudge-tf/bin/python -u -c “import setuptools, tokenize;file=‘/tmp/pip-install-q2Up_m/pyhcl/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d /tmp/pip-wheel-Pt1ol2 --python-tag cp27: running bdist_wheel running build running build_py Generating parse table… Traceback (most recent call last): File “<string>”, line 1, in <module> File “/tmp/pip-install-q2Up_m/pyhcl/setup.py”, line 101, in <module> “Topic :: Text Processing”, File “/usr/lib/python2.7/distutils/core.py”, line 151, in setup dist.run_commands() File “/usr/lib/python2.7/distutils/dist.py”, line 953, in run_commands self.run_command(cmd) File “/usr/lib/python2.7/distutils/dist.py”, line 972, in run_command cmd_obj.run() File “/home/matthbak/Apps/virtualenvs/foo-bar-fudge-tf/local/lib/python2.7/site-packages/wheel/bdist_wheel.py”, line 192, in run self.run_command(‘build’) File “/usr/lib/python2.7/distutils/cmd.py”, line 326, in run_command self.distribution.run_command(command) File “/usr/lib/python2.7/distutils/dist.py”, line 972, in run_command cmd_obj.run() File “/usr/lib/python2.7/distutils/command/build.py”, line 128, in run self.run_command(cmd_name) File “/usr/lib/python2.7/distutils/cmd.py”, line 326, in run_command self.distribution.run_command(command) File “/usr/lib/python2.7/distutils/dist.py”, line 972, in run_command cmd_obj.run() File “/tmp/pip-install-q2Up_m/pyhcl/setup.py”, line 39, in run self.execute(_pre_install, (), msg=“Generating parse table…”) File “/usr/lib/python2.7/distutils/cmd.py”, line 349, in execute util.execute(func, args, msg, dry_run=self.dry_run) File “/usr/lib/python2.7/distutils/util.py”, line 309, in execute func(*args) File “/tmp/pip-install-q2Up_m/pyhcl/setup.py”, line 31, in _pre_install import hcl File “/tmp/pip-install-q2Up_m/pyhcl/src/hcl/init.py”, line 1, in <module> from .api import dumps, load, loads File “/tmp/pip-install-q2Up_m/pyhcl/src/hcl/api.py”, line 2, in <module> from .parser import HclParser File “/tmp/pip-install-q2Up_m/pyhcl/src/hcl/parser.py”, line 4, in <module> from .lexer import Lexer File “/tmp/pip-install-q2Up_m/pyhcl/src/hcl/lexer.py”, line 3, in <module> import ply.lex as lex ImportError: No module named ply.lex


Failed building wheel for pyhcl Running setup.py clean for pyhcl Failed to build pyhcl Installing collected packages: ply, pyhcl Running setup.py install for pyhcl … done Successfully installed ply-3.11 pyhcl-0.3.12 `

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
marcjaycommented, Aug 19, 2019

Is there any update on this issue?

2reactions
tsiq-briancommented, Mar 28, 2019

I think I found a workaround for this issue until it can be solved the proper way. If installed via pip using the github url, it won’t produce an error during table generation.

(test-pyhcl) % pip3 freeze
(test-pyhcl) % pip3 install git+https://github.com/virtuald/pyhcl.git@0.3.12#egg=pyhcl
Collecting pyhcl from git+https://github.com/virtuald/pyhcl.git@0.3.12#egg=pyhcl
  Cloning https://github.com/virtuald/pyhcl.git (to revision 0.3.12) to /private/var/folders/xw/7w2ry0l91f14wl7vl2ds0xfh0000gn/T/pip-install-k37x8fnn/pyhcl
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting ply<4,>=3.8 (from pyhcl)
  Using cached https://files.pythonhosted.org/packages/a3/58/35da89ee790598a0700ea49b2a66594140f44dec458c07e8e3d4979137fc/ply-3.11-py2.py3-none-any.whl
Building wheels for collected packages: pyhcl
  Building wheel for pyhcl (PEP 517) ... done
  Stored in directory: /private/var/folders/xw/7w2ry0l91f14wl7vl2ds0xfh0000gn/T/pip-ephem-wheel-cache-t7thz65d/wheels/70/27/06/77de7cfd11f5e5bd1f905d666c0e0ead0965ee3b5cf165aba4
Successfully built pyhcl
Installing collected packages: ply, pyhcl
Successfully installed ply-3.11 pyhcl-0.3.12
(test-pyhcl) % 
Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems with PLY LEX and YACC - python - Stack Overflow
When I run the following code, it gives me an error regarding lex.lex() Anyone knows what the problem is? import ply.lex as lex...
Read more >
Software Packages in "jammy", Subsection python - Ubuntu
Construct, convert, and manipulate colors in a Pythonic manner. python3-colour (0.1.5-2) [universe]: converts and manipulates various color representation - ...
Read more >
Compare Packages Between Distributions - DistroWatch.com
This page enables us to quickly perform a side-by-side comparison of the packages available in two different distributions, or in two different versions...
Read more >
dev-python - Gentoo Packages
dev-python ; Browser-based graphing library for Python · Plugin and hook calling mechanisms for Python · Support library for building plugins sytems in...
Read more >
Debian -- Software Packages in "sid", Subsection python
... autoimport (1.3.1-1): Automatically import missing Python libraries ... dh-virtualenv (1.2.2-1.2): wrap and build Python packages using virtualenv ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found