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

Crashing at 'pip install coastseg' step #191

Closed
edlazarus opened this issue Sep 8, 2023 · 24 comments
Closed

Crashing at 'pip install coastseg' step #191

edlazarus opened this issue Sep 8, 2023 · 24 comments
Assignees
Labels
installation Any problems or questions about installation

Comments

@edlazarus
Copy link

Hello team –

I'm returning to CoastSeg from scratch (since March '23), but the install instructions are shutting me down at Step 4. There appears to be some issue involving tensorflow and dependency conflicts. I've copy/pasted (below) the relevant screed from my terminal window. Result is that the pip install coastseg step fails to complete. (Which I confirmed by blithely trying to do the rest of the steps, and having my terminal say, "What's jupyter lab? Never heard of it...")

I'm running macOS 10.13.6 and not attempting to do this install over a secure network. I'm working in Chrome (Version 116.0.5845.96, given the vintage of my macOS) – but I don't think this is an OS thing.

Huge thanks! Eager to see all your recent updates.

Eli

-- error copied here:

Collecting coastseg
Using cached coastseg-0.0.4-py3-none-any.whl (3.3 MB)
Using cached coastseg-0.0.3-py3-none-any.whl (3.3 MB)
Using cached coastseg-0.0.2-py3-none-any.whl (3.3 MB)
Using cached coastseg-0.0.1-py3-none-any.whl (3.3 MB)
ERROR: Cannot install coastseg==0.0.1, coastseg==0.0.10, coastseg==0.0.11, coastseg==0.0.12, coastseg==0.0.13, coastseg==0.0.14, coastseg==0.0.15, coastseg==0.0.16, coastseg==0.0.17, coastseg==0.0.18, coastseg==0.0.19, coastseg==0.0.2, coastseg==0.0.20, coastseg==0.0.21, coastseg==0.0.22, coastseg==0.0.23, coastseg==0.0.24, coastseg==0.0.25, coastseg==0.0.26, coastseg==0.0.27, coastseg==0.0.28, coastseg==0.0.29, coastseg==0.0.3, coastseg==0.0.30, coastseg==0.0.31, coastseg==0.0.32, coastseg==0.0.33, coastseg==0.0.34, coastseg==0.0.35, coastseg==0.0.36, coastseg==0.0.37, coastseg==0.0.38, coastseg==0.0.39, coastseg==0.0.4, coastseg==0.0.40, coastseg==0.0.41, coastseg==0.0.42, coastseg==0.0.43, coastseg==0.0.44, coastseg==0.0.45, coastseg==0.0.46, coastseg==0.0.47, coastseg==0.0.48, coastseg==0.0.49, coastseg==0.0.5, coastseg==0.0.50, coastseg==0.0.51, coastseg==0.0.52, coastseg==0.0.53, coastseg==0.0.54, coastseg==0.0.55, coastseg==0.0.56, coastseg==0.0.57, coastseg==0.0.58, coastseg==0.0.59, coastseg==0.0.6, coastseg==0.0.60, coastseg==0.0.61, coastseg==0.0.62, coastseg==0.0.63, coastseg==0.0.64, coastseg==0.0.65, coastseg==0.0.67, coastseg==0.0.69, coastseg==0.0.7, coastseg==0.0.70, coastseg==0.0.71, coastseg==0.0.72, coastseg==0.0.73, coastseg==0.0.74, coastseg==0.0.8 and coastseg==0.0.9 because these package versions have conflicting dependencies.

The conflict is caused by:
coastseg 0.0.74 depends on tensorflow
coastseg 0.0.73 depends on tensorflow
coastseg 0.0.72 depends on tensorflow
coastseg 0.0.71 depends on tensorflow
coastseg 0.0.70 depends on tensorflow
coastseg 0.0.69 depends on tensorflow
coastseg 0.0.67 depends on tensorflow
coastseg 0.0.65 depends on tensorflow
coastseg 0.0.64 depends on tensorflow
coastseg 0.0.63 depends on tensorflow
coastseg 0.0.62 depends on tensorflow==2.11.0
coastseg 0.0.61 depends on tensorflow
coastseg 0.0.60 depends on tensorflow
coastseg 0.0.59 depends on tensorflow
coastseg 0.0.58 depends on tensorflow
coastseg 0.0.57 depends on tensorflow
coastseg 0.0.56 depends on tensorflow
coastseg 0.0.55 depends on tensorflow
coastseg 0.0.54 depends on tensorflow
coastseg 0.0.53 depends on tensorflow
coastseg 0.0.52 depends on tensorflow
coastseg 0.0.51 depends on tensorflow
coastseg 0.0.50 depends on tensorflow
coastseg 0.0.49 depends on tensorflow
coastseg 0.0.48 depends on tensorflow
coastseg 0.0.47 depends on tensorflow
coastseg 0.0.46 depends on tensorflow
coastseg 0.0.45 depends on tensorflow
coastseg 0.0.44 depends on tensorflow
coastseg 0.0.43 depends on tensorflow
coastseg 0.0.42 depends on tensorflow
coastseg 0.0.41 depends on tensorflow
coastseg 0.0.40 depends on tensorflow
coastseg 0.0.39 depends on tensorflow
coastseg 0.0.38 depends on tensorflow
coastseg 0.0.37 depends on tensorflow
coastseg 0.0.36 depends on tensorflow
coastseg 0.0.35 depends on tensorflow
coastseg 0.0.34 depends on tensorflow
coastseg 0.0.33 depends on tensorflow
coastseg 0.0.32 depends on tensorflow
coastseg 0.0.31 depends on tensorflow
coastseg 0.0.30 depends on tensorflow
coastseg 0.0.29 depends on tensorflow
coastseg 0.0.28 depends on tensorflow
coastseg 0.0.27 depends on tensorflow
coastseg 0.0.26 depends on tensorflow
coastseg 0.0.25 depends on tensorflow
coastseg 0.0.24 depends on tensorflow
coastseg 0.0.23 depends on tensorflow
coastseg 0.0.22 depends on tensorflow
coastseg 0.0.21 depends on tensorflow
coastseg 0.0.20 depends on tensorflow
coastseg 0.0.19 depends on tensorflow
coastseg 0.0.18 depends on tensorflow
coastseg 0.0.17 depends on tensorflow
coastseg 0.0.16 depends on tensorflow
coastseg 0.0.15 depends on tensorflow
coastseg 0.0.14 depends on tensorflow
coastseg 0.0.13 depends on tensorflow
coastseg 0.0.12 depends on tensorflow
coastseg 0.0.11 depends on tensorflow
coastseg 0.0.10 depends on tensorflow
coastseg 0.0.9 depends on tensorflow
coastseg 0.0.8 depends on tensorflow
coastseg 0.0.7 depends on tensorflow
coastseg 0.0.6 depends on tensorflow
coastseg 0.0.5 depends on tensorflow
coastseg 0.0.4 depends on tensorflow
coastseg 0.0.3 depends on tensorflow
coastseg 0.0.2 depends on tensorflow
coastseg 0.0.1 depends on tensorflow

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

@2320sharon
Copy link
Collaborator

Hi @edlazarus
Welcome back to CoastSeg. 👋
This is an interesting issue you've discovered and not one any of our beta testers have run into before.
To better help resolve the issue could you let me know if you were running these commands in a fresh anaconda environment or using your old coastseg conda environment? I don't think any of our users have ran coastseg on a mac so that might be the reason why you're running into these issues.

I'll do some research on what might be causing these issues in the meantime.

@2320sharon 2320sharon self-assigned this Sep 8, 2023
@2320sharon 2320sharon added bug Something isn't working installation Any problems or questions about installation and removed bug Something isn't working labels Sep 8, 2023
@2320sharon
Copy link
Collaborator

Also if you don't mind, in a new conda environment can you run pip install tensorflow==2.13.0 so if we can see if vanilla tensorflow will work on mac

@edlazarus
Copy link
Author

Thanks @2320sharon – all happened within a fresh conda environment! I went for a total reboot. When it crashed, I then cleaned conda and tried again, with the same outcome.

So I'll make a new coastseg env and in it pip install tensorflow==2.13.0 – yes?

Eli

@2320sharon
Copy link
Collaborator

Hi Eli,
Having it fail in a fresh environment is certainly weird.
Yes if you could run pip install tensorflow==2.13.0 that would be great!

@edlazarus
Copy link
Author

Seeing this come back:

(base) uos-15366:CoastSeg-main edl1e16$ conda activate coastseg
(coastseg) uos-15366:CoastSeg-main edl1e16$ pip install tensorflow==2.13.0
ERROR: Could not find a version that satisfies the requirement tensorflow==2.13.0 (from versions: none)
ERROR: No matching distribution found for tensorflow==2.13.0

@2320sharon
Copy link
Collaborator

If that command works with new issues, can you perform a git pull from the main branch to make sure you have the latest code locally as well just to be safe?
Then try the following commands in the environment you ran the tensorflow install command in

conda install -c conda-forge geopandas jupyterlab -y
pip install coastseg==0.0.75.dev14

@2320sharon
Copy link
Collaborator

2320sharon commented Sep 8, 2023

Seeing this come back:

(base) uos-15366:CoastSeg-main edl1e16$ conda activate coastseg
(coastseg) uos-15366:CoastSeg-main edl1e16$ pip install tensorflow==2.13.0
ERROR: Could not find a version that satisfies the requirement tensorflow==2.13.0 (from versions: none)
ERROR: No matching distribution found for tensorflow==2.13.0

Ah, I think we found our issue

@2320sharon
Copy link
Collaborator

2320sharon commented Sep 8, 2023

Hmmm... I wonder what happens if you attempt to just install tensorflow without specifying a version
pip install tensorflow

And all this is happening in a brand new conda env that's never been used before too right?

@edlazarus
Copy link
Author

edlazarus commented Sep 8, 2023

All new env – the second fresh one for coastseg I made today. Creating the env has been fine – the crash came in the install coastseg bit...

I'll try tensorflow now.

Update: I'm going to wipe the slate again and just start from a brand new coastseg env – without attempting to pip install coastseg, so all we'll have is the clean env

@edlazarus
Copy link
Author

Returns:

(coastseg) uos-15366:CoastSeg-main edl1e16$ pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

@2320sharon
Copy link
Collaborator

2320sharon commented Sep 8, 2023

Thanks for trying all these commands. I believe something might be wrong with your anaconda installation since it can't install any version of tensorflow.

However, if I were you I would create a new conda env
conda create -n test_tensorflow python=3.10 -y
and I would try
pip install tensorflow
just to validate that something stored in the cache under the 'coastseg' name is not interfering.

If that fails too I would be curious if you've used tensorflow with any other conda projects. I would then try to re-install anaconda or update anaconda to see if that fixes the issue. This feels like a tensorflow issue

We have a github action that tests and installs coastseg on a mac with tensorflow installed so I know its possible to run coastseg on a mac.

@edlazarus
Copy link
Author

edlazarus commented Sep 8, 2023

Betting you're right, and I need a conda update. (I've not used tensorflow elsewhere for other things.) Test gambit returns:

(test_tensorflow) uos-15366:CoastSeg-main edl1e16$ pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

@2320sharon
Copy link
Collaborator

🤞 I hope the conda update goes smoothly and hopefully fixes the tensorflow issue

@2320sharon
Copy link
Collaborator

Hi @edlazarus
Did uninstalling and re-installing conda fix this issue?

@edlazarus
Copy link
Author

edlazarus commented Sep 12, 2023

Hmm – thanks for your patience, @2320sharon
After a complete reinstall (now running conda 23.7.2), I get exactly the same error as pasted above. I had high hopes! But alas.

I also just tried the test_tensorflow step recommended above, and it also failed, as before. (FYI – outside of the coastseg env, I'm running python version 3.11.10.)

Eli

@2320sharon
Copy link
Collaborator

Hi Eli,
Thanks for getting back to me. That's so strange that it's not working. And from the sound of it this issue is not just isolate to the coastseg environment but your whole anaconda installation. I'm going to take a guess that you can't even install tensorflow in your base conda environment either

@2320sharon
Copy link
Collaborator

Can you paste your os version details as well?

@edlazarus
Copy link
Author

edlazarus commented Sep 12, 2023

Correct (having just tried, with the Tensorflow web page open) – cannot install in my base, either...
I'm running macOS 10.13.6 – and the Tensorflow page says that should be sufficient. Likewise, my pip version is 23.2.1.

Errors (as before) read thus:

ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

@2320sharon
Copy link
Collaborator

Thanks for trying out tensorflow in your base environment. I'm honestly not too sure exactly what is going wrong with the tensorflow installation.

I'll do a bit of digging and see if I can come up with some potential causes of this problem.

It would be worth it to raise an issue on the official tensorflow github repository in the meantime.

I apologize that dealing with tensorflow has been such a chore. We've encountered multiple issues working tensorflow as we've worked on coastseg and the other projects in the doodleverse so we totally understand the frustration 😅

@2320sharon
Copy link
Collaborator

2320sharon commented Sep 12, 2023

Hi Eli,

After a bit of research and digging I'm wondering if maybe the version of MacOs you're running is not playing nice with tensorflow. All the system requirements you listed in this thread seem to be compatible so I'm not too sure why nothing is working still.

Its also possible that python 3.11 and the older version of MacOS are not compatible together so I would try both of these steps having python 3.11 as your python version, and if all of these fail trying them all again with python 3.10

3 Commands to Try

1. Check the python version running in anaconda

Inside your base conda environment run python --version and it should say 3.11 if everything is configured correctly.

2. Try installing the macos version of tensorflow from pip

pip install tensorflow-macos==2.13.0

3. Try installing tensorflow using anaconda

This is a last resort because tensorflow no longer maintains the conda-forge package for tensorflow. The version on anaconda is 2.12 which is out of date. However, if it this version of tensorflow can install, then maybe we can get you at least up and running with version 2.12
Try this command in an activated environment. conda install -c conda-forge tensorflow
https://anaconda.org/conda-forge/tensorflow

Your System

  1. macOS 10.13.6
  2. conda 23.7.2
  3. pip 23.2.1.

Tensorflow Requirements

  1. Tensorflow is compatible with python 3.11
  2. macOS 10.12.6 (Sierra) or higher (64-bit)
  3. pip version 20.3 or higher for macOS.

@edlazarus
Copy link
Author

Thanks @2320sharon for your continued heroics –
Unfortunately, the -macos workaround didn't take. Rather than draw this out any further, I'm going to try to launch CoastSeg from a Windows machine I have, and we'll roll from there. If Tensorflow & Macs don't play nice, then that's at least good to know. But I'd rather dig into CoastSeg by whatever means available – and that's another route in!

@2320sharon
Copy link
Collaborator

Thank you for trying these solutions out and sorry that none of these solutions worked out. Hopefully the windows installation goes much more smoothly

@dbuscombe-usgs
Copy link
Member

Sorry for all the hassles Eli - we're not set up to deal with older macs, it seems, just the latest OS. Sorry you have been the guinea-pig. Our 'beta testing' phase was basically 10 windows machine and 2 linux ones 😅

I'll add new clearer instructions for Mac users to readme and wiki

@edlazarus
Copy link
Author

No worries – older Macs aren't set up to deal with older Macs! I'm postponing an inevitable upgrade – but versions are starting to show their wear&tear. Thanks again, all...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Any problems or questions about installation
Projects
None yet
Development

No branches or pull requests

3 participants