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

Installing Desktop Client #7

Open
kathmcp opened this issue Mar 27, 2021 · 22 comments
Open

Installing Desktop Client #7

kathmcp opened this issue Mar 27, 2021 · 22 comments

Comments

@kathmcp
Copy link

kathmcp commented Mar 27, 2021

Hi, I am new to PHOEBE and not very computer savvy, however, I have managed to install PHOEBE v2.3.30 on my Windows computer using the Linux instructions and installing a Windows Subsystem for Linux. I am now trying to install the Desktop Client. When I go to this page https://github.com/phoebe-project/phoebe2-ui/releases/tag/1.0.1, do I download these files into my phoebe folder, and then run the setup file?

Also, when I followed the instructions from installing from PIP, I didn't do the steps for "Virtual Environments". Is this necessary, and if so, will it help with the above?

Any help would be much appreciated! Thanks

@kecnry
Copy link
Member

kecnry commented Mar 27, 2021

Hello! The UI clients are quite new and I think you are one of the first to attempt installing from scratch on Windows, so my apologies for the lacking documentation. I'll try my best to help and then will also try to improve the installation instructions for anyone to follow.

The desktop client and the python package for PHOEBE are entirely independent from each other, so you should be able to just run the setup folder and launch the client. But like I said, we don't have many Windows users/testers though, so you'll have to let me know if that gives you any problems and we'll try to sort them out.

The virtual environment is entirely optional (they can be handy if you have a lot of codes with different version dependencies, but if you don't have that situation, then it probably isn't worth all the extra effort). You can quickly check to make sure it is installed by entering the following in a WSL terminal/console: python3 -c "import phoebe; print(phoebe.__version__)". If that gives you any errors, then we will need to fix that before continuing.

Once the client is installed and launched, the client then needs to connect to an installed instance of PHOEBE (this may seem a little overcomplicated, but it allows you to run PHOEBE remotely on a machine with more resources if you want down the road). The desktop client attempts to launch a local instance and connect automatically, but I'm guessing Windows won't know how to find the version installed within WSL. To get around this, you should be able to launch phoebe-server --port 5555 (edit: not host) command within WSL and then click the "+" icon in the desktop client and enter "localhost:5555" to connect. You'll need to leave the terminal running the server open in the background but can kill/close it once you close the desktop client.

Let me know how it goes or if you have any questions. If we manage to get it up and running, I'll update the installation instructions with clearer advice for future Windows users.

If you're just getting started and haven't already tried it, we also have a web version with no installation necessary. This does have some limitations and isn't quite as convenient, but is a good place to get started and decide if you need a full local installation or not.

@kathmcp
Copy link
Author

kathmcp commented Mar 28, 2021 via email

@kecnry
Copy link
Member

kecnry commented Mar 28, 2021

Hi Kathryn - your attachment doesn't seem to have posted. Can you either paste the error message or you may need to post the attachment through github directly instead of email?

As for observation times, that is a difficult question to answer as it depends on the system, precision of observations, phase of observations, and the science and precision you're hoping to achieve from modeling. If it were a well-detached system, then there probably wouldn't be too much information between the eclipses, so I would suggest prioritizing observations during and around the eclipses themselves. But at 8.5 hours, that probably isn't the case and you probably have significant ellipsoidal variations. 10-15 minutes is probably reasonable, but at about 2% of the phase-width, this will probably result in significant phase-smearing which you'll then have to handle that in the model (its just a bit expensive).

@kathmcp
Copy link
Author

kathmcp commented Mar 29, 2021

Hi Kyle,

Thanks for your reply, and good advice about the observations times. I have tried attaching the screenshot here, hopefully it works this time.

ErrorScreenshot

@kecnry
Copy link
Member

kecnry commented Mar 29, 2021

Ah, that was my fault, sorry about that! Its --port 5555 not --host 5555 (I'll edit my message above just in case anyone else reads it).

There is a chance that you will also need to set the host to '0.0.0.0' if windows cannot see the localhost of the WSL session. Note that this will make the server available to anyone on the same network (although they would need the IP address of your machine), so might not be ideal on a public network.

@kathmcp
Copy link
Author

kathmcp commented Mar 29, 2021

Hi again,

I have tried using port 5555 now, and this is what I get. It's still saying phoebe not found, but if I enter python3 -c "import phoebe; print(phoebe.version)" it tells me I have version 2.3.30. And now there is another error message. You can see the PHOEBE app in the background where I have entered localhost:5555 but the wheel just keeps spinning.

ErrorScreenshot2

Thanks again!

@kecnry
Copy link
Member

kecnry commented Mar 29, 2021

Ok, the good news is I think this is just a version conflict issue that we should be able to work around and then I'll work to get a more permanent fix released for anyone else that might run into the same problem. Can you please tell me the output from running the following so I can see which package has the version conflict?

python3 -c "import flask_socketio, socketio, engineio; print(flask_socketio.__version__, socketio.__version__, engineio.__version__)"

It should output something like:

4.3.0 4.6.0 3.13.0

@kathmcp
Copy link
Author

kathmcp commented Mar 30, 2021

Ok so the output I get is
5.0.1 5.1.0 4.0.1
Hope that helps!

@kecnry
Copy link
Member

kecnry commented Mar 30, 2021

Ok, those are all too new and no longer compatible with the version included in the desktop client. Assuming you installed phoebe with pip, you should be able to downgrade them with something like the following:

pip3 install flask_socketio==4.3.0 socketio==4.6.0 engineio==4.0.1 --force-reinstall

(where you should use sudo or --user if you did the same while installing PHOEBE).

The phoebe not found message will still show and can safely be ignored. Hopefully this will get rid of the other message and the client will be able to connect to the server.

@kathmcp
Copy link
Author

kathmcp commented Mar 30, 2021

Hi again, so when I entered the above, I get another error saying it can't find socketio==4.6.0
ErrorScreenshot3

@kecnry
Copy link
Member

kecnry commented Mar 30, 2021

Interesting, there's a chance that just downgrading flask_socketio will do the trick and pull the necessary versions of the others. If that doesn't work, I'll work on getting a bugfix out in PHOEBE to make sure it pulls the right versions of everything.

@kathmcp
Copy link
Author

kathmcp commented Mar 30, 2021

So now it has installed flask_socketio version 4.3.0, but unfortunately it still doesn't work, and it looks like it still has socketio version 5.1.0. The phoebe app is trying to connect to the localhost:5555 server, and I have left it running for a few minutes now, but the wheel just keeps going round and nothing happens.

ErrorScreenshot4

@kecnry
Copy link
Member

kecnry commented Mar 30, 2021

Ok, let me try to reproduce this on a fresh system and I'll see if I can get a bugfix out for either phoebe or the client. In the meantime, you can always connect to the limited online server by clicking the "+" button and using "server.phoebe-project.org". Thanks and sorry for the trouble!

@kathmcp
Copy link
Author

kathmcp commented Mar 30, 2021

Ok I will do that. Thanks for all your help so far!

kecnry added a commit to phoebe-project/phoebe2 that referenced this issue Mar 31, 2021
* newer releases not compatible with version in desktop client
* see phoebe-project/phoebe2-ui#7
@kecnry
Copy link
Member

kecnry commented Mar 31, 2021

I fixed the version requirements in the latest PHOEBE bugfix (2.3.32). If you update with pip, I think it should pickup and fix all the versions... if not, you can try uninstalling and installing from scratch. Let me know if it works for you!

@kathmcp
Copy link
Author

kathmcp commented Apr 5, 2021

Hi again, sorry for the delay in replying. I have uninstalled and reinstalled PHOEBE, and it now says I have version 2.3.34. Unfortunately, it still says I have unsupported versions of Socket.IO and Engine.IO. I tried forcing the reinstall as above, but that doesn't work either.

ErrorScreenshot5
ErrorScreenshot6

@kecnry
Copy link
Member

kecnry commented Apr 14, 2021

Ok, thanks for the update. I'll have to dig in further and try to reproduce on a fresh system, but might not be able to do that right away. I'll keep you posted here if I have any luck, and in the meantime I guess you'll have to use the web UI or python interface. Sorry again for the troubles and thanks for helping to test!

@kathmcp
Copy link
Author

kathmcp commented Jun 9, 2021

Hi again, I am back onto my PHOEBE analysis now, having got my light curves from my telescope observations. I have been using the web UI, but am now trying to use the python interface, with PHOEBE installed via the Windows Subsystem for Linux. I have managed to use Jupyter Notebook, and am working through some of the tutorials, however, I get some error messages coming up.

When I enter !pip3 install -I "phoebe>=2.3,<2.4" it all seems to be installing, but I get the error message:
ERROR: launchpadlib 1.10.13 requires testresources, which is not installed.
ERROR: flask-socketio 4.3.2 has requirement python-socketio<5,>=4.3.0, but you'll have python-socketio 5.3.0 which is incompatible.

However, things seem to run ok even with this message, but then when I try to do a plot, by entering "afig, mplfig=b.plot(show=True)", I get the error shown in the snippet.
PlotErrorSnip

Any help would be much appreciated again!
Thanks

@kecnry
Copy link
Member

kecnry commented Jun 9, 2021

Those are just deprecation warnings from matplotlib (meaning in future versions of matplotlib, it will stop working). As long as the plot works, it shouldn't be a problem for now. We have updated this for the 3.4 release so the warning will go away (once 3.4 is released) and will then be compatible with future versions of matplotlib.

Thanks!

@kathmcp
Copy link
Author

kathmcp commented Jun 9, 2021

Unfortunately, the plot is not working. It only shows the warnings. Is there anything I could try to fix it?

@kecnry
Copy link
Member

kecnry commented Jun 9, 2021

Do plots normally show for you in notebooks? Some Jupyter setups require %matplotlib inline or %matplotlib notebook at the top of the notebook.

To confirm it isn't an issue with PHOEBE, you could also try doing the same outside Jupyter (in an interactive python session or running as a script), or by plotting to a file by passing (filename='whatever.png' to the plot call).

@kathmcp
Copy link
Author

kathmcp commented Jun 9, 2021

Great, that's sorted it, thanks again!

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

No branches or pull requests

2 participants