-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tensorflow 1.15 impossible to use after update #3266
Comments
Unfortunately, changing Python in Colab is not supported. As you know, tensorflow 1 doesn't support Python 3.8 . That being said, you can still use fallback version (python 3.7) for a few more days. For more details on how to use the fallback version - #3246 . However, please upgrade your notebooks to be compatible with Colab’s current runtime version. |
@mayankmalik-colab Hello, I was also using tf 1.15 because it is one of the requirements to run a repository I'm using for a project. But now I can't install it via |
Sorry, nothing we can do on this, this is on Tensorflow's issue. |
Hey @beachboy4545 , I found a way. Apparently you can install conda in colab. But, you have to activate your environment every time you want to use it. Follow this code blocks and you will achieve it: Before everything, set pythonpath to nothing so you don't have conflicts.
First, you get miniconda (I'm using miniconda with python 3.8 version, but you can change it). You have to keep the path '/usr/local' to make it work. Otherwise, colab will not recognize conda.
Then, append this path to install packages.
Create your virtual environment with python version that matches TensorFlow 1.15 (3.6)
Install TensorFlow 1.15
Run your python file. Remember to activate your virtual environment as suggested.
Observations: As I mentioned, you have to activate your environment every time you need TensorFlow 1.15. Also, this approach works if you want to run python files. In my case this works. I hope this can help you too. Best regards! |
Hello, |
Hello @licj1, |
@Atotem Your method worked like a charm! It does seem I not only have to reactivate but also rebuild an environment to use it, however, this is a small price to pay to make Colab useful for me again. Thank you! |
@Atotem I have tried your method, like you said I have created new environment and installed tensorflow == 1.15, after installing it I have tried to check the version it is still showing tensorflow = 2.12.0 |
dude u are a miracle maker |
as mentioned by Atotem this only works for python files , so you can insert |
I cant find file test.py |
Tensorflow 1.15 can be used inside colab by creating seperate conda environment and inside it installing tensorflow with following command
|
u have to create that file, its not present by default
and then run this command in colab cell:
basically we are runny .py files in a virtual conda enviroment if we try to print tensorflow version in a colab cell, it will print the latest version tf 2.x |
from what i found out, we can only run one .py file at a time. i run the imports.py file, then when i try to run the 2nd file, it doesnt take the imports i did in the ist file into account |
Hello there! I am have the same problem that in the .py file in it can't access the gpu, did you find an solution for this? Thank you have a great day |
You saved my life bro. thanks a lot! |
True!! Did you find any solution. Actually I am running stylegan2 code in google colab and I am facing exact same error as run_training.py file contains other module files and they are not considering tf==1.15 instead they are considering as tf==2x. |
I followed all these steps, but when I check the python version it doesn't show 3.6.. How can I solve this? |
Describe the current behavior
Hello, my research requires that I use tensorflow 1.15. I am no longer able to use:
!pip install tensorflow==1.15
because there is no distribution for said version on Python 3.8.
When I use :
!sudo update-alternatives --config python3
followed by:
!sudo apt install python3-pip
!python3 -m pip install --user --upgrade pip
Then when I use:
!pip3 install tensorflow==1.15
I receive the message:
"WARNING: The following packages were previously imported in this runtime:
[astor,google]
You must restart the runtime in order to use newly installed versions."
When I restart my runtime, I receive a message that my session has crashed and the app.log has many warnings of:
"| WARNING | /usr/bin/python3: No module named ipykernel_launcher"
Describe the expected behavior
I expect that I would be able to restart my runtime without any crashing occuring and that I would be able to run the rest of my code that involves tensorflow1.15
What web browser you are using
Google Chrome
Additional context
(https://colab.research.google.com/gist/beachboy4545/d84aa2f8202099fa6e645971ea26dd0f/runtime-crash-tf1-15.ipynb)
The text was updated successfully, but these errors were encountered: