Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No module named lex" error #4

Open
tomelabs opened this issue Jul 10, 2017 · 5 comments
Open

"No module named lex" error #4

tomelabs opened this issue Jul 10, 2017 · 5 comments

Comments

@tomelabs
Copy link

Hi There,

This is a great project, thanks for putting it together.
I'm having an error when trying to run the hello.py script from my (windows) python 2.7.x instance:

C:\Python27\python.exe hello.py
Traceback (most recent call last):
  File "hello.py", line 2, in <module>
    from PyZ3950 import zoom
  File "C:\Python27\lib\site-packages\PyZ3950\zoom.py", line 73, in <module>
    from PyZ3950 import ccl
  File "C:\Python27\lib\site-packages\PyZ3950\ccl.py", line 124, in <module>
    import lex
ImportError: No module named lex

any suggestions?

@Kijewski
Copy link

Kijewski commented Jul 10, 2017

You need to pip install ply. The requirement is not installed automatically with PyZ3950.

@tomelabs
Copy link
Author

tomelabs commented Jul 10, 2017

Thanks @Kijewski

Still no luck unfortunately. It successfully imported ply to my C:\Python27\Lib\site-packages but I'm still getting the following. I'll try on my Linux machine later today.

C:\Python27\python.exe hello.py
Traceback (most recent call last):
  File "hello.py", line 2, in <module>
    from PyZ3950 import zoom
  File "C:\Python27\lib\site-packages\PyZ3950\zoom.py", line 73, in <module>
    from PyZ3950 import ccl
  File "C:\Python27\lib\site-packages\PyZ3950\ccl.py", line 124, in <module>
    import lex
ImportError: No module named lex

@MarsitFaycel
Copy link

for linux 👍
python2.7.x :sudo apt-get install python-ply
python 3.x: sudo apt-get install python3-ply
https://www.howtoinstall.co/en/ubuntu/utopic/python-ply

@ghost
Copy link

ghost commented Jun 2, 2021

how do you do this on Mac ? and I have also ran pip install ply

tried also brew install python-ply and brew install python3-ply with no luck

Screen Shot 2021-06-02 at 3 40 42 PM

@cclauss
Copy link
Contributor

cclauss commented Jul 27, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants