Problem installing in Colab
Hey! I wish to confirm if it occurred to you multiple times. I have faced that error, but it resolved when I restarted the colab instance. Please check whether your resources were caped when running this. In case of low disk space, colab does not allow further imports sometimes. Just reopening the instance solves the issue most of the times. In case it is still persistent, please instruct me on how to reproduce the error. 
More technical log. Note: SetupTools has been updated.

```
**UserWarning**: The version specified ('729681c50ce87d0dea774ea8b1f893eacdfccc52\n') is an invalid version, 
this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.

 python setup.py egg_info did not run successfully.
 exit code: 1


###################
# Invalid version #
###################
'729681c50ce87d0dea774ea8b1f893eacdfccc52\n' is not valid according to PEP 440.

Please make sure specify a valid version for your package.
Also note that future releases of setuptools may halt the build process
if an invalid version is given.

``` @18mdemark Could you please confirm if the issue has been resolved after restarting the colab?
Thank you! Hi, i'm having the same issue, i've already restarted colab, also i tried to install it in a local environment and the same happened Oh, if it is a general issue then I can work on it and try to see what's causing the problem. @sushreebarsa if you are not working on it then can you please assign the issue to me? Good evening,

Since yesterday I am having the same issue when executing the first cell of the TensorFlow Segmentation tutorial: https://www.tensorflow.org/tutorials/images/segmentation. No issues before yesterday. 

Restarting Colab does not solve the issue for me.

Regards,
Federico Hey, @fedezocco @alecamacho @18mdemark, I guess it is a problem with pip installing git.

Please try these commands in order once:
1. `!apt remove git -y` - remove any degraded git module
2. `!apt-get install git -y && git clone https://github.com/tensorflow/examples.git` - Install git first, then clone.

Meanwhile, I will look at possible problems and create a PR if I am able to solve it. @Shreyas-SAS, thanks for the prompt reply. Should I execute 1 and 2 **before**

!pip install git+https://github.com/tensorflow/examples.git ?

If that is what you meant, then I tried and it does not solve the problem. I get the same error message.

Federico > @Shreyas-SAS, thanks for the prompt reply. Should I execute 1 and 2 **before**
> 
> !pip install git+https://github.com/tensorflow/examples.git ?
> 
> If that is what you meant, then I tried and it does not solve the problem. I get the same error message.
> 
> Federico

No actually there seems to be a problem with installing git using pip. 

The 1st code line is to remove any instance of git if it was not completely installed. 

2nd is to first install git using apt and then clone the repo.  The second is an alternative to the pip command that you mentioned.  I see. So I am executing 1 and 2 instead of the pip command I mentioned. Then, I proceed with the Segmentation tutorial as usual. Now I get the error below
![Capture](https://user-images.githubusercontent.com/62107909/228492552-77b969f4-754c-41ba-abcc-5d1dc5616122.PNG)
 > I see. So I am executing 1 and 2 instead of the pip command I mentioned. Then, I proceed with the Segmentation tutorial as usual. Now I get the error below
> ![Capture](https://user-images.githubusercontent.com/62107909/228492552-77b969f4-754c-41ba-abcc-5d1dc5616122.PNG)
> 

Oh. It actually worked fine for me yesterday. Please give me some time, I will have to check again if there wasn't any error due to pre-imported tensorflow module in my system, I will revert back as soon as possible after finishing my classes.  Hi, if you're cloning https://github.com/tensorflow/examples.git in colab and want to import pix2pix model from the tensorflow_examples' model package, then make sure that you're using the import command from the right path.

It seems that the command `from examples.tensorflow_examples.models.pix2pix import pix2pix` doesn't work because the module tensorflow_examples is not in your working directory. You can either change the working directory or can change the import statement.

For example, if the examples repository folder is in your working directory, use `from examples.tensorflow_examples.models.pix2pix import pix2pix`. 

I hope this helps!

<img width="1344" alt="image" src="https://user-images.githubusercontent.com/72040194/228700520-956952a9-a976-43b4-95c8-88d74580fc69.png">
 > Hi, if you're cloning https://github.com/tensorflow/examples.git in colab and want to import pix2pix model from the tensorflow_examples' model package, then make sure that you're using the import command from the right path.
> 
> It seems that the command `from examples.tensorflow_examples.models.pix2pix import pix2pix` doesn't work because the module tensorflow_examples is not in your working directory. You can either change the working directory or can change the import statement.
> 
> For example, if the examples repository folder is in your working directory, use `from examples.tensorflow_examples.models.pix2pix import pix2pix`.
> 
> I hope this helps!
> 
> <img alt="image" width="1344" src="https://user-images.githubusercontent.com/72040194/228700520-956952a9-a976-43b4-95c8-88d74580fc69.png">

Thank you @yuktathapliyal and @Shreyas-SAS, you solved my issues. Glad that I could help. Still, I am trying to understand why the pip command isn't working. Is there an OpenSource repo for pip? Someone can tell them about this problem. If it's working fine with other package managers, then there is no problem on TensorFlows side I guess. Sorry for responding to the thread late, I've been running into identical issues as Feezocco. That workaround from yuktathapliyal after cloning the repository into my colab instance is working.

Tried to use pip and still nothing, but this will work for my project.

Thanks! @18mdemark Thank you for your response!
Could you please confirm if the issue has been fixed and close the ticket?
Thank you! > 

I'm facing the same problem, after running:

!apt remove git -y
!apt-get install git -y && git clone https://github.com/tensorflow/examples.git

**I still get error:**

```
1 from tensorflow_examples.models.pix2pix import pix2pix
      2 from tensorflow.keras.layers import Input, Conv2DTranspose, Concatenate
      3 
      4 up_stack = [
      5     pix2pix.upsample(512, 3),  # 4x4 -> 8x8

ModuleNotFoundError: No module named 'tensorflow_examples'
```

What are we missing? > from examples.tensorflow_examples.models.pix2pix import pix2pix

can you try once using `from examples.tensorflow_examples.models.pix2pix import pix2pix` and check. 
Really sorry for the late reply though. `!git clone https://github.com/tensorflow/examples.git`
`import sys
sys.path.append('/content/examples')
`
`import tensorflow_examples as tf_ex
`
i hope it could work! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. > when running
> 
> > _!pip install -q git+https://github.com/tensorflow/examples.git_
> 
> I get kicked this error
> 
> > error: subprocess-exited-with-error
> 
> × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> See above for output.
> 
> note: This error originates from a subprocess, and is likely not a problem with pip. Preparing metadata (setup.py) ... error error: metadata-generation-failed
> 
> × Encountered error while generating package metadata. ╰─> See above for output.
> 
> note: This is an issue with the package mentioned above, not pip. hint: See above for details.
> 
> Anyone know any fixes for this problem?




hi . How did you fix it
 > Hey, @fedezocco @alecamacho @18mdemark, I guess it is a problem with pip installing git.
> 
> Please try these commands in order once:
> 
> 1. `!apt remove git -y` - remove any degraded git module
> 2. `!apt-get install git -y && git clone https://github.com/tensorflow/examples.git` - Install git first, then clone.
> 
> Meanwhile, I will look at possible problems and create a PR if I am able to solve it.

I solved this problem by adding this before installing. Same problem here, I can install other packages using pip, the problem is with this package. Could be something about upgrading the python version from 3.7 to 3.10 in colab? Hello,  @18mdemark! Could you please let us know if this is still an issue for you ? I am able to run the code successfully on colab using TF v2.12. Please find the gist [here](https://colab.research.google.com/gist/sushreebarsa/7477799a916fe51c36cc874744f152c7/60106.ipynb) and confirm the same?

Thank you!
 > Hello, @18mdemark! Could you please let us know if this is still an issue for you ? I am able to run the code successfully on colab using TF v2.12. Please find the gist [here](https://colab.research.google.com/gist/sushreebarsa/7477799a916fe51c36cc874744f152c7/60106.ipynb) and confirm the same?
> 
> Thank you!

It works! at least for me.
 This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.
when running

> _!pip install -q git+https://github.com/tensorflow/examples.git_

I get kicked this error

>  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Preparing metadata (setup.py) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.


Anyone know any fixes for this problem?