Skip to content
← Back to Community
Crashes every time I install tensorflow.
Profile icon
h
has Hacker Plan
hg0428

Every time I try to use TensorFlow on repl.it it crashes before a single package is installed. report bug here: https://repl.it/bugs/p/crashes-every-time-i-install-the-tensorflow-module

Voters
Profile icon
Identity-Unknown
Profile icon
annabellez
Profile icon
Scotch101Tape
Profile icon
JuanCristobal
Profile icon
TheGodfatherX
Profile icon
PaxtonLuangniko
Profile icon
ReneeGouge
Profile icon
AIAcademy
Profile icon
DiegoAlarcon
Profile icon
hg0428
Comments
hotnewtop
Profile icon
cookeydev

To use TensorFlow in Replit, run pip install tensorflow-cpu in the shell, then create a .replit file and in it, put:

run="python main.py" [packager] ignoredPackages=["tensorflow"]

Now you can use import tensorflow as tf

The Replit VM has no GPU, so you have to install tensrflow-cpu, which has CPU-only support.
When you install tensorflow-cpu, if you use import tensorflow, python imports tensorflow-cpu. Replit doesn't know that, so when you import tensorflow it will automatically install normal tensorflow. By adding tensorflow to ignoredPackages, Replit won't install normal tensorflow.

Profile icon
PizzaRules668

@cookeydev
Thank you!
How do you install tensorflow-1.15
ERROR: Could not find a version that satisfies the requirement tensorflow==1.15

Profile icon
cookeydev

@PizzaRules668 I think you would install tensorflow-cpu==1.15

Profile icon
PizzaRules668

@cookeydev
I tried that
I think I figured It out I need python 3.7 not 3.8

Profile icon
hg0428

thanks, I will try that
@cookeydev

Profile icon
DiegoAlarcon

I am having the same exact issue, I believe this is not happening with other libraries.

Profile icon
hg0428

It is not happening with any other libraries, but no libraries are installed if any one of them can not be installed. @DiegoAlarcon

Profile icon
HackermonDev

Do you have the explorer role? If you do you should remove it because this glitch only happens if you have explorer role (i think)

Profile icon
hg0428

@PDanielY
It did not work

Profile icon
HackermonDev

@hg0428 hmm. I'll check it out

Profile icon
JordanRenaud

If any of you are still having issues like I am go ahead and upvote my bug report so it gets seen , front page, scroll down a bit, called Tensorflow

Profile icon
Identity-Unknown

same!

Profile icon
AIAcademy

Same for me!