Maintaining different python versions for virtual environments - python-3.x

I have 2 different versions of python. 1 is always used with my anaconda and it is 3.9.7.
For the vs code, I tend to change the versions according to need.
Currently I have a project which requires me to use tensorflow 1.5-1.7 for which I require python 3.5 or 3.6 max. I have tried installing python 3.6 and then I create a virtual environment with it.
I try installing tenosrflow 1.5 using the below given command
pip install tensorflow==1.5
I get the error
ERROR: Could not find a version that satisfies the requirement tensorflow==1.5 (from versions: 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.8.0rc0, 2.8.0rc1, 2.8.0)
ERROR: No matching distribution found for tensorflow==1.5
Is there any way available to maintain 2 different python version as I need to keep both.

Related

error no such option: --build-dir pycharm

I installed a second older Version of python (3.6) because I couldn't do something in my newer version. I created a new pycharm project with a new virtual environment and 3.6 as base interpreter. But when I try to install a package in pycharm (for example numpy) I get the error: no such option: --build-dir
Some things of note, that might be important to answer my question: I haven't added 3.6 to the path, when I installed it because the newer version is the one I mainly use. Also according to the following code my pip version is 21.3.1 :
import pkg_resources
print(pkg_resources.get_distribution("pip").version)

Using Uncompyle6 library with virtual environment (virtualenv )

I'm creating virtual environment with virtualenv library.I want to decrypt the .pyc extension file.The purpose of me using this library is that Uncompyle6 library doesn't support python 3.9 it yet.
I installed the 3.8.0 version of python in the virtual environment.Then i installed Uncompyle6 library.
Up to this point there was no problem.When I checked the python version in terminal, it showed 3.8.0
uncompyle6 file.pyc > file.py
When I run this code I get the following error.
RuntimeError: Version 3.9 is not supported.
My questions is:
Why doesn't it reference my version of python in the virtual environment? and
How can I run it with the python version I installed in the virtual environment?

Difficulty in Installing GraphLab for python 3.5.2

I am a newbie in Machine learning and want to build a recommendation system for my class project. To do so, I need to work with GraphLab. But I cannot find any version of it which will be supported by python 3.5.2. The latest available version is 2.1, which is supported by python 2.7x. Is there any equivalent package of GraphLab, or any alternative ways to build this system?
Currently there's no stable release of GraphLab for python 3.5. They are working on a stable release. However, there were a beta release here for 3.5 which seems to be inaccessible right now. You may try out scikit-learn, H2O as alternative.They have support for 3.5.

Twisted for python3.5?

There is no Twisted for python 3.5 at https://pypi.python.org/pypi/Twisted ,I am using python 3.5.2,what should I do?
I recently encounter a similar problem.
try this Unofficial Windows Binaries for Python Extension Packages
http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
Use command "pip install yourfilename.whl"
I used it to fix the problem while installing scrapy
Each new release of Twisted includes updates that bring full equal functionality to the python3 version. Releases are roughly monthly, so you may find that the module already works for you.
It is possible (for example with virtualenv) to install both python2 and 3 How to install both Python 2.x and Python 3.x in Windows 7
Twisted support of python 3 on windows is lagging a little behind support on other systems. So if you have access to another OS you may find that it will allow you to install twisted for python 3.

Will a higher version of Python build Node.js?

I'm running the latest Ubuntu (14.04) and have just downloaded the Node.js tarball. I'm not very familiar with Python though, and although I love Ubuntu, I'm also not familiar with the process of downloading and installing stuff on Linux as well :/
It says on the Node.js download page that Python 2.6 or 2.7 is required, but I have found that newer versions of Python are available. Will a newer version of Python build it correctly?
If you're not familiar with Linux then I don't think you want to compile node.js yourself from source. You can still use the binaries.tar.gz
There are Ubuntu packages that will install node.js for you! Installing from a package manager is easier, try https://github.com/joyent/node/wiki/installing-node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions
As for building from source, there are known issues with Python 3, ref https://github.com/joyent/node/wiki/installation#known-issues, so maybe stick with 2.6 or 2.7
Python versions starting with and including 2.6 up through before 3.0 should work fine. Python 3 brought some backwards incompatible changes with Python 2.x and AFAIK gyp has not been updated to support Python 3 yet.

Resources