-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
pip installation using github repository incomplete #56
Comments
Pip install by itself should be fine. If you're trying to clone and run master, something might have broken with relative imports Make sure you're using python 3.6+ as well |
@Borda looks like pep8 recommends absolute imports as well. let's just go back to those, i remember now why i got rid of relative imports a long time ago. Causes all sorts of headaches and it's not clear where things are coming from. |
ok awesome. should be on master now |
@egonuel pls could you check it now... |
@Borda I just checked it and now I'm getting this error (numpy is installed):
|
it seems that |
I just tried to get the latest master using pip, and I still get the same error as posted above... |
I googled arround a bit and this has something to do with the pip version. I had installed pip 19.2.1. After downgrading to 18.0 the installations works. For reference see here earthlab/earthpy#206 |
@williamFalcon there are two possible solutions, fix
try:
from .models.trainer import Trainer
from .root_module.root_module import LightningModule
from .root_module.decorators import data_loader
except ImportError as e:
print(e)
see the fix in #71, you may try it as |
unfortunately, the #68 was merged in really fast fashion without complete testing... |
@Borda thanks, this runs through and installs without errors. |
@egonuel sorry you’re still having install issues! @Borda thanks for taking a look. I’m not sure whether something was introduced that broke it, haven’t had any pip install issues. a few things:
installing to blank environment would be a good move for CI but might be slow no? |
i run branches on my gpu machine before merging if tests pass there then i merge since those are more thorough. in some cases it may look like CI didn’t finish bc the local gpu run finishes first, which is when i merge |
#56 (comment) sure but before you test the setup, you install or you already gad installed the requirements so all needed libraries were there... which is another story from installing to blank env |
up to you, if you chose fix setup you need to keep in mind that the version is at two files (
for conda it should be fine since at already comes with preinstalled most libraries
relative/absolute import does not change anything in this context
not necessary, it just changes order, you try to install which install also all requirement and later when you ask for requirements installation it pass since everything is already there... |
* fix loading package while setup #56 * Update setup.py * Update __init__.py * Update setup.py * use complete req. * Update setup.py * Update setup.py
@egonuel try again? |
@williamFalcon it works now, nice! Thanks a lot! |
I tried to install pytorch-lightning using pip and the github repository.
Importing the module results in the following errors:
`
ModuleNotFoundError Traceback (most recent call last)
in
8 from torchvision import ops
9
---> 10 import pytorch_lightning as ptl
11 from pytorch_lightning import Trainer
12 from test_tube import Experiment
/opt/miniconda3/envs/dev_pytorch_lightning36/lib/python3.6/site-packages/pytorch_lightning/init.py in
----> 1 from .models.trainer import Trainer
2 from .root_module.root_module import LightningModule
3 from .root_module.decorators import data_loader
ModuleNotFoundError: No module named 'pytorch_lightning.models'`
Following the error I found out, that there is no
models
folder under the pathsite-packages\pytorch_lightning
The text was updated successfully, but these errors were encountered: