0

I'm trying to run this example with appropriate configuration and package versions defined in that link using Anaconda.

It should be noted that current default Python version of Google-Colaboratory is Python 3.7 so I have to install Python 3.6 and downgrade needed library packages in a new environment to work with Python 3.6. Uninstalling default Python is not a good idea and makes colaboratory misfunctional or at least I don't know how to reconfigure it.

So I tried installing Anaconda with Python 3.6, besides the default of colaboratory. Weather I uninstall the default Python or not, I need Anaconda as pointed in the first link for the appropriate version of library packages to be configured. In order to do that I tried these two, first this walk-through and then this question which I prefer the 2nd because leaves the default libraries of Python 3.7 intact; Both work well, but the problem is that when I try to import libraries for example numpy, colaboratory has already imported old library that PATH points to.

import sys
# import numpy

sys.path.remove('/usr/local/lib/python3.7/dist-packages/')
sys.path = ['/usr/local/lib/python3.6/site-packages/'] + sys.path
sys.path.append('/usr/local/lib/python3.7/dist-packages/')
sys.path

Which outputs:

['/usr/local/lib/python3.6/site-packages/',
 '',
 '/content',
 '/env/python',
 '/usr/lib/python37.zip',
 '/usr/lib/python3.7',
 '/usr/lib/python3.7/lib-dynload',
 '/usr/lib/python3/dist-packages',
 '/usr/local/lib/python3.7/dist-packages/IPython/extensions',
 '/root/.ipython',
 '/usr/local/lib/python3.7/dist-packages/']

After this setup I tried to import numpy and find out what is numpy.__version__ which I expected to be 1.13 but still default numpy version or 1.19 is imported.

Please note that I didn't get what is the pyngrok library for and couldn't use that link generated by this library for jupyter because I don't know where should I get key requested.(see this question which I already mentioned)

Am I doing something wrong? It points to package library of default Python3.7. Restarting runtime has no impact but reverting back the path configuration of Anaconda while imported library is the same old one. Maybe I have to investigate Jupyther-Notebook or Google-Colaboratory's configurations, a configuration like PATH which I don't know about. Any help or ideas or solutions? Again am I doing something wrong and you're fine with the process?

Thanks in advance.

0 Answers0