No Module named Transformers
Author: rod08018
Pull request: no
Labels: name: wontfix

name: Installation

# 🐛 Bug
 No module found transformers
## Information
Package                  Version   
------------------------ ----------
absl-py                  0.9.0     
astor                    0.8.1     
boto3                    1.12.22   
botocore                 1.15.22   
cachetools               4.0.0     
certifi                  2019.11.28
chardet                  3.0.4     
click                    7.1.1     
docutils                 0.15.2    
filelock                 3.0.12    
gast                     0.2.2     
google-auth              1.11.3    
google-auth-oauthlib     0.4.1     
google-pasta             0.2.0     
grpcio                   1.27.2    
h5py                     2.10.0    
idna                     2.9       
jmespath                 0.9.5     
joblib                   0.14.1    
Keras-Applications       1.0.8     
Keras-Preprocessing      1.1.0     
Markdown                 3.2.1     
numpy                    1.18.1    
oauthlib                 3.1.0     
opt-einsum               3.2.0     
pandas                   1.0.2     
Pillow                   7.0.0     
pip                      20.0.2    
protobuf                 3.11.3    
pyasn1                   0.4.8     
pyasn1-modules           0.2.8     
python-dateutil          2.8.1     
pytorch-transformers     1.2.0     
pytz                     2019.3    
pywin32                  227       
regex                    2020.2.20 
requests                 2.23.0    
requests-oauthlib        1.3.0     
rsa                      4.0       
s3transfer               0.3.3     
sacremoses               0.0.38    
scipy                    1.4.1     
sentencepiece            0.1.85    
setuptools               41.2.0    
six                      1.14.0    
tensorboard              2.1.1     
tensorflow               2.1.0     
tensorflow-estimator     2.1.0     
tensorflow-gpu           2.1.0     
tensorflow-gpu-estimator 2.1.0     
termcolor                1.1.0     
tokenizers               0.5.2     
torch                    1.4.0     
torchvision              0.5.0     
tqdm                     4.43.0    
transformers             2.5.1     
urllib3                  1.25.8    
Werkzeug                 1.0.0     
wget                     3.2       
wheel                    0.34.2    
wrapt                    1.12.1 
Using Bert on English language
## To reproduce

Steps to reproduce the behavior:
I just run the following code.
from transformers import BertTokenizer

# Load the BERT tokenizer.
print('Loading BERT tokenizer...')
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased', do_lower_case=True)


---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-ff68f42f17c9> in <module>
----> 1 from transformers import BertTokenizer
      2 
      3 # Load the BERT tokenizer.
      4 print('Loading BERT tokenizer...')
      5 tokenizer = BertTokenizer.from_pretrained('bert-base-uncased', do_lower_case=True)

ModuleNotFoundError: No module named 'transformers'

## Expected behavior

Do the tokenization.

## Environment info
<!-- You can run the command `python transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->
C:\Users\David\anaconda3\python.exe: can't open file 'transformers-cli': [Errno 2] No such file or directory
     
- `transformers` version:transformers             2.5.1   
- Platform: Windows 10
- Python version: 3.7.3b
- PyTorch version (GPU?):1.4
- Tensorflow version (GPU?):2.1
- Using GPU in script?:yes
- Using distributed or parallel set-up in script?:distributed


Comments:
Well this just indicates that you didn't correctly install the library. Try creating a new environment and installing from scratch.


You have to install the library first to use any module from it
First type `pip install transformers` in your terminal and then you can import the necessary modules

I fixed it had to uninstall it and reinstale from source. I dont know why
pip versión didnt work

On Sat, Mar 21, 2020, 8:44 AM Tanmay Pandey <notifications@github.com>
wrote:

> You have to install the library first to use any module from it
> First type pip install transformers in your terminal and then you can
> import the necessary modules
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/transformers/issues/3342#issuecomment-602054984>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACNYAIIOLEBX2E52BF5B4Q3RITHD3ANCNFSM4LPAPAWA>
> .
>


This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.


The error still occurs I have reinstalled it from the source, still it's not working 
ENV details :
Windows 10
Anaconda 
Pytorch 

I don't think `transformers` can be installed using anaconda.
In any case, please open a new issue **with the filled-in issue template** for us to properly help you.

> I don't think `transformers` can be installed using anaconda.
> In any case, please open a new issue **with the filled-in issue template** for us to properly help you.

So how do install it on my local system ??

https://github.com/huggingface/transformers#installation

I had to downgrade to an older version to have this working frankly did not find a solution for some reason.

Hi dacidotor, I am having the same issue which version you downgrade? 
I tried upgrading tensorflow and pytorch and then installing all again and it did not work.


try this:
from transformers.models.bert.modeling_bert import BertEmbeddings