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

ModuleNotFoundError: No module named 'lightseq.inference'; 'lightseq' is not a package #59

Closed
gm3g11 opened this issue Jun 21, 2021 · 5 comments

Comments

@gm3g11
Copy link

gm3g11 commented Jun 21, 2021

I could use the " pip install lightseq" command to install the lightseq package, and I could import the lightseq in the python file. But I encountered "ModuleNotFoundError: No module named 'lightseq.inference'; 'lightseq' is not a package" when I try to run the command "import lightseq.inference as lsi". Do I miss some steps? Thanks.

@Taka152
Copy link
Contributor

Taka152 commented Jun 22, 2021

@gm3g11 the master readme is updated to version 2.0.0,but pypi version is still 1.2,and we're updating it.For now,You can checkout the 1.2 tag and follow that readme.

@Taka152
Copy link
Contributor

Taka152 commented Jun 22, 2021

You can try it again, we have updated the pypi version to 2.0.0

@zmingshi
Copy link

zmingshi commented Jun 22, 2021

You can try it again, we have updated the pypi version to 2.0.0

I am faced with the same problem,
I install from the source codes, like python setup.py install

lightseq                 2.0.0

the problem remains,

$python ls_gpt_time_test.py
Traceback (most recent call last):
  File "ls_gpt_time_test.py", line 3, in <module>
    import lightseq.inference as lsi
ModuleNotFoundError: No module named 'lightseq.inference'

on the other hand, using commands pip install -U lightseq, it will install lightseq=1.2.0

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: lightseq in /home/local/miniconda3/lib/python3.7/site-packages (1.2.0)

it will cause the same ModuleNotFoundError

@Taka152
Copy link
Contributor

Taka152 commented Jun 22, 2021

@zmingshi You can check docs/build.md to install from source with inference support. And it will only install the training module if inference installation failed, you can check the warning log to verify it.

wheels on https://pypi.tuna.tsinghua.edu.cn/simple/lightseq/ haven't synced to the latest version, you can try the default PyPI index.

@zmingshi
Copy link

@zmingshi You can check docs/build.md to install from source with inference support. And it will only install the training module if inference installation failed, you can check the warning log to verify it.

wheels on https://pypi.tuna.tsinghua.edu.cn/simple/lightseq/ haven't synced to the latest version, you can try the default PyPI index.

thanks a lot, installing from PyPI index works fine now!

@gm3g11 gm3g11 closed this as completed Jun 23, 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

3 participants