python virtual environment version issue - python-3.x

I installed python version - 3.10.6 but because some of
AWS services can not support the runtime, I downgrade system python version to 3.9.14 and then try to create the virtual environment using the virtualenv .dev but, the new environment created with python version 3.10.6 beside of 3.9.6
Can not understand that how it is possible? and how to solve it? Please help. Thank you for time and consideration.

Related

libboost_python-dev for Python 3.8 on Ubuntu 22.04

I have a production server with Ubuntu 20.04 and Python v3.8.10.
My development environment is Ubuntu 22.04 with Python v3.10.6.
Both environments make use of a virtual environment when running python code.
Thus far the differences between Python 3.8 and 3.10 have not necessitated that I match my environments exactly. However, I am now forced to use a poorly maintained Python library in my code (provided by a payment gateway), and I encountered version-specific bugs with the library immediately after installing it. Needless to say, I am not confident that if I get it working in the development environment, it will work in the production environment as well. I need to be sure it works in production the first time.
I believe I have managed to successfully install Python 3.8 from source on my development system (without uninstalling Python 3.10). I managed to set up the virtualenv with the older version of Python successfully as well. The installation of requirements, however, fails with /usr/bin/ld: cannot find -lboost_python: No such file or directory during the installation of the pgmagick package. My understanding of the error is that I am missing the libboost_python-dev package for Python v3.8.
How can I install the older libboost_python-dev package on ubuntu 22.04?

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?

Python3.5 to python3.7 upgrade in the build

Idea is to build the distroless docker image and available python3 google distorless image version is 3.7 - gcr.io/distroless/python3. Our code is already compiled and running with python3.5 version and required to upgrade the version into 3.7 so that we can get rid of the library, compactability issues and can make use of the distroless image with verison 3.7. Some questions are,
Will version upgrade cause any issues to the existing code compilation?
Do we need to change all the requirements.txt versions according to the 3.7?
If yes, will there is an impact of the application?
the Python language does not provide backward compatibility. My recommendation for you is to run your code on a virtual env with the new version of Python and test your code. If you do not want to use virtual env you could create a new docker image with the Python version and test your app. Regarding the requirements.txt, without seeing the libraries or packages there, it is impossible to say if you should change the file.

Manage two different versions of Python

In my system Python 3.8 version already install, but I want create virtual env for version 3.7 on vscode so how can I do>
To work on different environments, you can use Anaconda Prompt.
You can follow the steps given in this: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

Which version of Miniconda has Python 3.6 for Windows 64-bit?

I'm working on a project which need these deep learning libraries - keras and tensorflow. Unfortunately, these do not work with Python 3.7. Can someone please tell me a Miniconda version (for Windows 64-bit) which has Python 3.6?
I've tried creating virtual environment with Python 3.6, but the libraries don't install properly.
Any help will be appreciated! Thanks!
I wanted to find the last package in the 3.6 series, so I found the announcement of the python 3.7 package build (September 4, 2018) and then looked that package up by date in https://repo.continuum.io/miniconda/ (Miniconda3-4.5.11), then traced it back one release. The end result:
Miniconda3-4.5.4 was the last Python 3.6 miniconda package.
Miniconda3-4.5.11 is the first that uses 3.7.
There are no releases 4.5.5->4.5.10 in that repository.
I just downloaded Miniconda3-4.3.31 for Windows 64bit and it came with Python 3.6.3.
https://repo.continuum.io/miniconda/
Binary: https://repo.continuum.io/miniconda/Miniconda3-4.3.31-Windows-x86_64.exe

Resources