Unable to install transformers & its related dependencies due Issue with Python Versions
## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->

- `transformers` version: NA
- Platform: Windows 10 (64 bit)
- Python version: 3.6 / 3.10
- PyTorch version (GPU?): NA
- Tensorflow version (GPU?): NA
- Using GPU in script?: NA
- Using distributed or parallel set-up in script?: NA

### Who can help
@gante @Rocketknight1 
<!-- Your issue will be replied to more quickly if you can figure out the right person to tag with @
 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- ALBERT, BERT, XLM, DeBERTa, DeBERTa-v2, ELECTRA, MobileBert, SqueezeBert: @LysandreJik
- T5, Pegasus, EncoderDecoder: @patrickvonplaten
- Blenderbot, MBART, BART, Marian, Pegasus: @patil-suraj
- Reformer, TransfoXL, XLNet, FNet: @patrickvonplaten
- Longformer, BigBird: @ydshieh
- FSMT: @stas00
- Funnel: @sgugger
- GPT-2, GPT: @patil-suraj, @patrickvonplaten, @LysandreJik
- RAG, DPR: @patrickvonplaten, @lhoestq
- TensorFlow: @Rocketknight1
- JAX/Flax: @patil-suraj
- TAPAS, LayoutLM, LayoutLMv2, LUKE, ViT, BEiT, DEiT, DETR, CANINE: @NielsRogge
- GPT-Neo, GPT-J, CLIP: @patil-suraj
- Wav2Vec2, HuBERT, SpeechEncoderDecoder, UniSpeech, UniSpeechSAT, SEW, SEW-D, Speech2Text: @patrickvonplaten, @anton-l

If the model isn't in the list, ping @LysandreJik who will redirect you to the correct contributor.

Library:

- Benchmarks: @patrickvonplaten
- Deepspeed: @stas00
- Ray/raytune: @richardliaw, @amogkam
- Text generation: @patrickvonplaten @narsil
- Tokenizers: @SaulLu
- Trainer: @sgugger
- Pipelines: @Narsil
- Speech: @patrickvonplaten, @anton-l
- Vision: @NielsRogge, @sgugger

Documentation: @sgugger

Model hub:

- for issues with a model, report at https://discuss.huggingface.co/ and tag the model's creator.

HF projects:

- datasets: [different repo](https://github.com/huggingface/datasets)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Examples:

- maintained examples (not research project or legacy): @sgugger, @patil-suraj

For research projetcs, please ping the contributor directly. For example, on the following projects:

- research_projects/bert-loses-patience: @JetRunner
- research_projects/distillation: @VictorSanh

 -->

## Information

Model I am using (Bert, XLNet ...):

The problem arises when using:
* [x] the official example scripts: Following the contribution guidelines wherein its written to run command - `pip install -e ".[dev]"`  inside a virtual environment
* [ ] my own modified scripts: (give details below)

The tasks I am working on is:
* [x] an official GLUE/SQUaD task: The task was to add type hints & decorators for the various models [part of code cleanup 2022]
* [ ] my own task or dataset: (give details below)

## To reproduce

Steps to reproduce the behavior:

1.  Create a virtual environment with python version 3.10 (latest) or with 3.6 .
2.  Install the required dependencides mentioned in setup.py file via command - `pip install -e ".[dev]"` 
3.  During installation it gives out this error -> 
![image](https://user-images.githubusercontent.com/36916536/160109627-df2f7bf1-a9b1-40e3-a4eb-2e29cee481f3.png)
 which causes no further installation of any dependencies ie transformer was not installed.

<!-- If you have code snippets, error messages, stack traces please provide them here as well.
     Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
     Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.-->

## Expected behavior
On running the pip install command every dependency along with transformers should get install completely with the python version 3.6 or 3.10 as in the setup.py file its mentioned `python>=3.6.0`  but still it didnt work with 3.6/3.10 versions
![image](https://user-images.githubusercontent.com/36916536/160110165-99771a4c-9b67-4461-b44c-08f2ce6a6b96.png)

**Note** :- But I was able to install all the dependencies completely & smoothly with **`python version 3.8`**
<!-- A clear and concise description of what you would expect to happen. -->

cc @ydshieh -- @robotjellyzone was the user I mentioned yesterday, that had the installation uses. It seems like we have related problems for python 3.6 and 3.10 :( <|||||>I could reproduce the issue with Python 3.10.
From what I could saw (quickly), `ray` doesn't support yet Python 3.10.
See https://github.com/ray-project/ray/pull/21221

And for Python 3.6, we have some discussion to drop its support soon, but at this moment, I am not very sure about the process. Let's see what Lysandre says regarding this part.

(I am not even able to create a py 3.6 env via conda ...)<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.<|||||>is this issue resolved or is it just fine to let it as it is in a close state? @gante @ydshieh <|||||>Hi, @robotjellyzone 

- Python 3.6 will be dropped over the next few weeks: #16832
- And as far as I know, `ray` still doesn't support Python 3.10 (yet). See https://github.com/ray-project/ray/pull/21221

I believe closing this issue is reasonable.<|||||>> Hi, @robotjellyzone
> 
> * Python 3.6 will be dropped over the next few weeks: [Dropping support for Python 3.6 #16832](https://github.com/huggingface/transformers/issues/16832)
> * And as far as I know, `ray` still doesn't support Python 3.10 (yet). See [Add support for Python 3.10 ray-project/ray#21221](https://github.com/ray-project/ray/pull/21221)
> 
> I believe closing this issue is reasonable.

Oh Great! if python 3.6 will be dropped then i guess everything will be fine but then it needs to be mentioned in the setup file as well so that others can use versions greater than 3.6. 
so shall i create a pr for changing the version mentioned in the setup.py file? <|||||>Hi, @robotjellyzone Thank you for the offer. We will do this when v4.19.0 is released. Currently we are still in v4.18.0 release, and we can't change setup.py before we officially drop it :-)<|||||>i have an issue with installing transformers using packer. Can someone help me with transformers not getting installed ?

      "inline": [
        "python3 -m venv .env",
        "source .env/bin/activate",
        "source activate tensorflow2_p38",
        "pip install --upgrade pip",
        "pip install transformers",
        "pip install torch",
        "pip install tensorflow-gpu==2.7.0"
      ],
      "type": "shell"
    },<|||||>Hi @krishnacloud77 👋  Reading above, it seems like you are activating two python environments (assuming `tensorflow2_p38` is a python environment) -- try using only one of them. Also, I'd recommend installing TF and PT from the extras, i.e. `pip install transformers[tf,torch]`<|||||>Hi gante

> Hi @krishnacloud77 👋 Reading above, it seems like you are activating two python environments (assuming `tensorflow2_p38` is a python environment) -- try using only one of them. Also, I'd recommend installing TF and PT from the extras, i.e. `pip install transformers[tf,torch]`

Hi gante
still issue not resolved after removing one venv.

      "inline": [
        "python3 -m venv .env",
        "source .env/bin/activate",
        "source activate tensorflow2_p38",
        "pip install  --upgrade pip",
        "pip install transformers[tf,torch]",
        "pip install torch",
        "pip install --user tensorflow-gpu==2.7.0"
      ],
      "type": "shell"
    },<|||||>The series of commands above is still activating two environments, and it's also installing torch and tensorflow externally. Try this:

```
    "source activate tensorflow2_p38",
    "pip install  --upgrade pip",
    "pip install transformers[tf,torch]",
```<|||||>I have tried those commands already. Amazon ebs error. Says source activate command not found. This is getting installed through packer, to build an AMI. 