3 ways to pip install the fastai2 package - Blog Post

I just published the following post: 3 ways to pip install a package: fastai2 use-case

It’s a detailed description on how to pip install the fastai2 package using 3 different methods, and which method to pick depending on your specific use-case.

Method 1: Installing from pypi repository
Method 2: Installing from GitHub - Non-editable package
Method 3: Installing from GitHub - Editable package

@jeremy I think you may be interested in that blog post given the fact that it may help both new students and some fastai member who aren’t familiar with fastai2 yet in quickly install fastai2. There are also a couple Appendices that detail how to install Ananconda and how to create a virtual environment.

I wrote this blog post late last night until early this morning, so I didn’t have time to extensively proof-read it as I would have done in other circumstances. I think it is pretty accurate but I will continue to proof-read it later today.

Please feel free to move this post to any thread that you might find more appropriate.

Looking forward for the course tonight :slightly_smiling_face:

Thank you @hamelsmu for the amazing job that you did, and for all the improvements that you keep pushing. Fastpages is just awesome!

6 Likes

Very nice!

2 Likes

Great writeup! BTW, I tried to comment on your post (to say something really nice), but looks like you don’t have comments app installed

You can find instructions on that here

2 Likes

Thank you very much. I will do that.

I just enabled it, I hope it works now! Thank you @hamelsmu for your help :slightly_smiling_face:

2 Likes

Very helpful, was looking for exactly that.

“Lacking to do so, the package will be installed in your current virtual environment.”

Did you mean “global environment”?

EDIT:
Sorry, I see what you mean, but it assumes that you have already created a base (Anaconda) environment.

I misread your statement " I voluntarily omitted the conda install…" to mean that you do not use Anaconda, but actually implicitly you do.

@Antoine.C, The current virtual environment can be either the default one called base or any another virtual environment that you alrealdy created and activated in your current session.
Hence, the 2 cases:

case 1:
You didn’t activate any conda virtual environment: this means you are using the default environment called base which you are referring to it as global environment: In a sense it is a global one.

Therefore, current virtual environment = base

Case 2:
You activate another virtual environment, let’s say called gluon. If you are pip installing fastai2 there you may “affect” your gluon virtual environment with fastai2 package. Therefore, you are taking the risk that either fastai2 dependencies or gluon dependencies start to interact between each other, they may uninstall each others dependencies and install different versions of those ones, and sometimes errors start to pop because of the use of the wrong version of a shared dependency.

So, in this case current virtual environment = gluon

Yes I do, and I use it all the time. What I meant is even if I’m using anaconda, I install fastai2 using pip install as opposed to using conda install because in Google Colab, for example, you cannot install Anaconda there.

I’m aware that you are not a beginner and the answer might seem long but, whenever it’s possible, I usually try to write a more detailed answer that might help other people who are just starting to approach the subject of the topic as a beginner.

1 Like