Share your repls and programming experiences

← Back to all posts
Solved Tensorflow Installation on Free Accounts
jazzymaya

Hello Everyone,

Link to full video of all steps I took: https://www.screencast.com/t/aXux3Jc3L4Y
(FYI) This video is 9mins and 23 seconds long. I would suggest you watch it if my explanation below isn't clear.

I discovered a temporary solution/work around to the problem of installing tensor flow on repl.it under the free account version. I was using tensor flow in a Django application so this guide is catered to the Django Template repl.it instance.
First, understand that if you run your application by hitting the “run” button on top of the screen, repl.it has a script that immediately looks at the poetry.lock file first for any packages and also automatically pulls packages you imported within your code. This means that if you are running code with “import tensor flow as ___”, the poetry.lock file will automatically capture this and try to download tensor flow ’s package. Because repl.it shuts down our repo’s to conserve resources, they expect the users to hit this “Run” button because within the poetry.lock file, Django is listed there as well. If you try to run “python manage.py run server 0.0.0.0:3000 in the console instead of hitting the “Run” button, you will get an error saying Django isn’t installed. Therefore, I hit the “Run” button so that Django can install properly. However, the installation for tensor flow will fail because we are only provided 500MB of RAM, the tensor flow installation is too big for the server's capacity. This is why you receive the error, “Package operation: failed”. After you receive this error, you must run "python3 -m pip install tensor flow --no-cache-dir" within the console to download tensor flow properly. This command installs the package with less RAM. You may see a lot of “This requirement is already satisfied…” within the console because the poetry.lock attempt may have been able to download some of these packages. Continue to let tensor flow do a complete download. You will know it is successful after it says so and the orange “>” is available again for you to input more commands in the console.
Now you should be able to run your Django application with tensor flow! NOTE: You MUST run your server by typing, “python manage.py run server 0.0.0.0:3000” in the console. DO NOT HIT THE “Run” BUTTON ON THE TOP! If you hit this button again, the package installation will fail because its trying to download tensor flow the regular way and I already told you it wont work because its too big for the 500MB of RAM we are provided. NOTE2: You could also download Django within the console and possibly avoid using the “Run” button completely but I have not tested this out myself.

I hope this helps you with your application!

Thanks ~jazzymaya

UPDATE 2/18/21: I had some issues with TensorFlow again not installing both through poetry.lock and my work around "--no-cache-dir". I went to my profile and turned off the role of "Explorer" and things worked normally.

Voters
YashPatel14
irhu
MsJasmine
comet99
jazzymaya
Comments
hotnewtop
comet99

This need more upvotes