ModuleNotFoundError - "model" directory is missed in setup.py
See original GitHub issueBug description
“model” directory is missed in “packages” argument in setup.py script. That issue raised ModuleNotFoundError: No module named 'esm.model'
exception.
Reproduction steps
Try to install esm
package from PyPI or from the GitHub repository.
Expected behavior I was expected successful installation.
Logs
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Input In [1], in <cell line: 2>()
1 import torch
----> 2 import esm
File ~/protein_embeddings/env/lib/python3.8/site-packages/esm/__init__.py:9, in <module>
6 from .version import version as __version__ # noqa
8 from .data import Alphabet, BatchConverter, FastaBatchedDataset # noqa
----> 9 from .model.esm1 import ProteinBertModel # noqa
10 from .model.esm2 import ESM2 # noqa
11 from .model.msa_transformer import MSATransformer #noqa
ModuleNotFoundError: No module named 'esm.model'
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
ModuleNotFoundError using setup.py - Stack Overflow
And run jktool to execute my_function but I get the error: ModuleNotFoundError No module named 'jkt'. But when the app.py in jkt directory...
Read more >Installing from source results in ModuleNotFoundError #41
There's currently a minor bug in setup.py - the required packages=['kitti2bag'] parameter is missing and causes normal installation to fail.
Read more >ModuleNotFoundError: no module named Python Error [Fixed]
When you try to import a module in a Python file, Python tries to resolve this module in several ways. · As the...
Read more >Install spaCy · spaCy Usage Documentation
spaCy is a free open-source library for Natural Language Processing in Python. It features NER, POS tagging, dependency parsing, word vectors and more....
Read more >Sharing Code Using a setup.py File in Python
What are the Errors? ModuleNotFoundError: No module named 'common'. This error occurs when you are trying to import a Python package/module that is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tomsercu PR #254 is resolving the issue problem but there is another during the installation.
The
fairscale
package is required (not added to setup.py as well).I might be wrong, but the setup.py is rather curiously written, I don’t know your guys setup and I have not looked at the history, but it very much looks like be a case of files being erroneously switched for a test or similar. Say
setuptools.setup
function lacks a requirement argument (i.e. no fairscale module))setuptools.find_packages
fills subpackages without issues (okay, PyCharm does it but is bad)__version__
is read very oddlySo might be worth checking there’s no weird accident in the version!