# How do make sure I am using the transformer version/code from source?

**URL:** <https://discuss.huggingface.co/t/how-do-make-sure-i-am-using-the-transformer-version-code-from-source/9511>\
**Category:** Beginners\
**Created:** [August 27, 2021, 12:33am UTC](https://discuss.huggingface.co/t/how-do-make-sure-i-am-using-the-transformer-version-code-from-source/9511 "2021-08-27T00:33:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mc1](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mc1](https://discuss.huggingface.co/u/mc1)\
**Post date:** [August 27, 2021, 12:33am UTC](https://discuss.huggingface.co/t/how-do-make-sure-i-am-using-the-transformer-version-code-from-source/9511/1 "2021-08-27T00:33:05Z")

</div>

How do I know whether my jupyter notebook is using the transformer version/code that I cloned from github?

My steps:  
I did fork the transformers repo in my github account then I did:  
_git clone --recursive [https://github.com/myaccount/transformers.git](https://github.com/myaccount/transformers.git)_  
_cd transformers/_  
_conda create -n hf-dev-py380 python=3.8.0_  
_conda activate hf-dev-py380_  
_git checkout v4.9.2-release_  
_pip install -e “.[dev]”_  
_conda install -c conda-forge librosa_  
_conda install libgcc_  
_export LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:$HOME/miniconda3/lib/_  
_transformers-cli env_

_conda install jupyter_  
_nohup jupyter notebook --ip=0.0.0.0 --port=myport &_

When I type in my terminal “python --version”, it appears the same python version that my jupyter notebook prints (v3.8.0). But a different python version (v3.7) and directory appear in my jupyter notebook when I type:  
_import transformers_  
_print(transformers)_  
_\<module ‘transformers’ from ‘/mypath/miniconda3/lib/python3.7/site-packages/transformers/ **init**.py’\>_

How do I make sure my jupyter notebook is using the transformer code I cloned in my terminal?

Thanks!

---

<div class="post-metadata">

**Author:** ![mc1](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mc1](https://discuss.huggingface.co/u/mc1)\
**Post date:** [August 27, 2021, 4:53am UTC](https://discuss.huggingface.co/t/how-do-make-sure-i-am-using-the-transformer-version-code-from-source/9511/2 "2021-08-27T04:53:52Z")

</div>

Just to complement my question, the [documentation](https://huggingface.co/transformers/installation.html) says that _pip install -e ._ command would link the folder I cloned the repository to my python library paths. So the python packages would get installed into the directory I used to clone the repo, which is _…/transfomers/_. But still I don’t see the site-packages folder there.

Any idea what do I need to do to link my jupyter notebook to my cloned folder?

Thank you!

---

<div class="post-metadata">

**Author:** ![mc1](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mc1](https://discuss.huggingface.co/u/mc1)\
**Post date:** [September 1, 2021, 7:20pm UTC](https://discuss.huggingface.co/t/how-do-make-sure-i-am-using-the-transformer-version-code-from-source/9511/3 "2021-09-01T19:20:27Z")

</div>

Hi community!  
Any idea on this topic? Thanks!

---

<div class="post-metadata">

**Author:** ![shabie](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@shabie](https://discuss.huggingface.co/u/shabie)\
**Post date:** [September 4, 2021, 11:33pm UTC](https://discuss.huggingface.co/t/how-do-make-sure-i-am-using-the-transformer-version-code-from-source/9511/4 "2021-09-04T23:33:52Z")

</div>

Why don’t you simply try (after importing the library):

`print(transformers. __version__ )`

and see if it turns out to be the one you are looking for?

---

<div class="post-metadata">

**Author:** ![mc1](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mc1](https://discuss.huggingface.co/u/mc1)\
**Post date:** [September 27, 2021, 6:05pm UTC](https://discuss.huggingface.co/t/how-do-make-sure-i-am-using-the-transformer-version-code-from-source/9511/5 "2021-09-27T18:05:41Z")

</div>

Thank you, @shabie . The command is very useful!

But how do I make sure my the printed Transformer version (eg. 4.10.3) is using the transformer code I cloned in my terminal? Is there any setting file in transformer code where I can double check about it?

Thank you!

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](https://discuss.huggingface.co/u/nielsr)\
**Post date:** [September 28, 2021, 9:51am UTC](https://discuss.huggingface.co/t/how-do-make-sure-i-am-using-the-transformer-version-code-from-source/9511/6 "2021-09-28T09:51:20Z")

</div>

What I always use is the following:

```auto
!rm -r transformers
!git clone https://github.com/huggingface/transformers.git
!cd transformers
!pip install -q ./transformers

```

---

<div class="post-metadata">

**Author:** ![mc1](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mc1](https://discuss.huggingface.co/u/mc1)\
**Post date:** [October 11, 2021, 10:40pm UTC](https://discuss.huggingface.co/t/how-do-make-sure-i-am-using-the-transformer-version-code-from-source/9511/7 "2021-10-11T22:40:16Z")

</div>

Thanks a lot for sharing what you do!
