In my computer there are both python 3.9.1 which I downloaded myself and 3.9.7 which comes along with anaconda. And I faced problems when I wanted to install package into one of them. Currently I used python3.9 -m pip install pack_name to install the package. But it does not differentiate 1 or 7. It seems it will try to install for both. Also when I type python3.9 -V it shows 3.9.7 in computer's terminal but shows 3.9.1 in vscode's terminal... I tried to change version in Python:select interpreter of vscode but it made no difference. I tried python3.9.1 ... but that is not a command;(.
Is there any way to specifically use one of them?
I am running a raspberry pi with an armv7l image, and I want to use python 3.8 as my base version. This image of raspbian comes with python 3.4 and python 2.7. I downloaded python3.8 and manually compiled it.
However, all previous version of python reside in /usr/bin and /usr/lib while my manually compiled version resides in /usr/local/bin.
When I run conda info, the output says python version : 3.4.3.final.0
and when I run conda search python the output says python 2.7.10 and python * 3.4.3.
My question is, how do I get conda to recognize the python version 3.8.2 that I've manually compiled and installed?
I've tried searching around the internet but the only answers I've found are ones in which you install a new version of python instead of adding a version you already have.
I'm new to programming and following a course where I must install Tensorflow. The issue is that I'm using Python 3.8 which I understand isn't supported by Tensorflow.
I've downloaded Python 3.6 but I don't know how to switch this as my default version of python.
Would it be best to set up a venv using python 3.6 for my program and install Tensorflow in this venv?
Also, I using Windows and Powershell.
Tensorflow is only supported until python 3.7 as of now.
You can check it here: https://www.tensorflow.org/install/pip
But there is a way to install it on Python3.8, just run the below command that will do your job:
python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
This command work on mac and windows both, I haven't tested on Linux.
You should always use venv because by default every project on your system will use these same directories to store and retrieve site packages (third party libraries). At first glance, this may not seem like a big deal, and it isn’t really, for system packages (packages that are part of the standard Python library), but it does matter for site packages.
Consider the following scenario where you have two projects: ProjectA and ProjectB, both of which have a dependency on the same library, ProjectC. The problem becomes apparent when we start requiring different versions of ProjectC. Maybe ProjectA needs v1.0.0, while ProjectB requires the newer v2.0.0.
You can also take a look at anaconda, it’s the most populasr data sciencie platform and will be easy for you install tensorflow and jupiter notebook in just 2 clicks. Anaconda
Uninstall all your python versions and use the latest anaconda.
$ conda create --name tensorflow python=3.5
This way you create a virtual environment with python 3.5 which is supported by tensorflow.
So now you can install it.
$ activate tensorflow
(tensorflow) $ pip install tensorflow
it would have been nice if you would have the share the error screenshot
though as per i got the case
tensorflow work in both 3.8 and 3.6 just you have to check that you have 64bit version not 32 bit
you can acess both version from thier respective folder no need to install a venv
If you don't want to use Anaconda or virtualenv, then actually multiple Python versions can live side by side. I use Python38 as my default and Python35 for TensorFlow until they release it for Python38. If you wish to use the "non-default" Python, just invoke with the full path of the python.exe (or create a shortcut/batch file for it). Python then will take care of using the correct Python libs for that version.
Worked on Python 3.8.2 (default, Mar 05 2020, 18:58:42) [GCC] on linux
pip3 install --upgrade tf-nightly
Python Versions 3.5 - 3.8 are supported now.
You can verify on this page:
https://www.tensorflow.org/install/pip
I am using py.exe to fire a py script to require a minimal python version (3.6 in my case).
#!/usr/bin/env python3.6
...
...
This requires you to have some 3.6.x installed. How can I tell it my script also works with 3.7 and above? Is it even possible?
EDIT to make it more clear: In other words I'd like to run my script with any version above 3.6.x. I don't want to be told:
Requested Python version (3.6) is not installed
when I do have 3.7.
I have the 3.5 version of python. I want to install Anaconda, but it says on the Anaconda website the latest version of it is for Python 3.6. My question is could I still use the packages for Python 3.5, or should I install Python 3.6?
When you install Anaconda Python, it installs into its own area and wouldn't conflict with an existing Python installation. If you already have additional Python packages installed, you will need to reinstall them for the new Python installation, preferably using a Python virtual environment. You can't use a Python virtual environment from an existing Python installation and would need to create a new one against Anaconda Python if already using one.
If your own personal code works with Python 3.5, it likely will work with Python 3.6 no problems.
So with the above caveats on re-installing additional Python packages, there shouldn't be any reason why you couldn't use Anaconda Python 3.6.
I had the same problem where I couldn't run anaconda with python 3.6. What I did was to install anaconda with python 3.5. Go to https://repo.continuum.io/archive/ then download Anaconda3-4.2.0-Windows-x86_64.