Azure python version path is different than IDE python version - python-3.x

I'm trying to debug in vs code. I installed the new python version and removed the old ones. However, this is happening.
How can I fix this error?

I used #BijayRegmi suggestion and it worked!

Related

I've upgrade my python to 3.11 and delete python 3.10 including pakages too. though visual studio code is showing me the suggestion of old pakages

intellisense
interpreter
☝️ look these screen shots
i've tried to restart my laptop and reinstalling the python extension and all but it still same. how can i fix it ? please help !

Getting Error in Django Application on Azure App Service

I am getting since yesterday on appliction from yesterday it's working fine early some upgradtion on cloud breaks the application
This is the error
Error : module 'typing' has no attribute '_ClassVar'
My python env is 3.7 and Django version 2.1.3
Please check the below steps if that helps to fix the issue:
Try downgrading the Python version to 3.6 and check.
Also, run this command pip uninstall dataclasses when using the Python Version 3.7
As Charlie V Said,
Check the version of the Python in your App Service versus the version you use to develop. Check the requirements file and compare that with your development.
I had a similar problem in the past. The first thing is determine if your application is actually using this module. If yes, make sure you have it at your requirements.txt. If no, refer to the logs to understand which python file is referencing it and remove the reference for it.

Showing python 2.7.12 for python 3.9.1 on Command window?

I am using python 3.9.1 on my computer and when I try this command on cmommand windows : python -- version , I come up with 2.7.12 !!! And it does not show the version correct.
I uninstalled python and removed all the related files on C drive as well as environmental Variables...
Now I don't have python but it still shows the version 2.7.12 when I ask for Command windows!!!
Does anyone know what is the problem ????
if you have both versions then you should write python2 --version o
Go to my computer, right click and then properties. Here go to Advanced System setting
and at the bottom of the window open Environment Variables and check any variable having python on it. if there are two variable maybes this is the problem.
Also go to the app data on your windows and check files if there is a file related to the older version of python.
Good Luck.
You can use PowerShell instead of cmd as well try this one after checking the variables.

Anaconda Python for Gurobi 6.0.4 installation _Py_FalseStruct error

In order to run an optimization problem we set up Gurobi 6.0.4 together with
Anaconda (Version 2.2.0) Python (Python 2.7.9.) on
Linux CentOS release 6.6 (Final) with the 2.6.32-504.16.2.el6.x86_64 Kernel
Following the installation guidelines of Gurobi (listed here: http://www.gurobi.com/documentation/6.0/quickstart_linux.pdf)
everything worked out in the first step. Gurobi was installed, could obtain a license. Also the PATH variables have been set (in the .bashrc) according to the manual, with a little extension for the referal to anaconda python (and not the other local Versions of python (being 2.7 and 3.4):
export GUROBI_HOME="/opt/gurobi604/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin:${PATH}:opt/anaconda/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
Following the procedure we executed: python2.7 setup.py install in the respective directory /opt/gurobi604/linux64. After this usually you could run the import gurobipy command in the python interpreter wihtout errors. For older Versions of Gurobi (as 5.6.3) this works out very well.
For 6.0.4 though we constantly receive the error:
ImportError: /opt/anaconda/lib/python2.7/site-packages/gurobipy/gurobipy.so: undefined symbol: _Py_FalseStruct
This is very reproducible, no matter if we put anaconda also in the global path, and check the bash for any overwriting of the environment variables, which is not the case.
On Windows 8 the Gurobi 6.0.4 and Anaconda Python 2.2.0 work together without any problems.
Also applying hints from here: Python Module Error on Linux did not work out.
Did anyone else experience these problems with this tooling combination? thx.
The error message indicates that you use the Python module for version 3.4 in your Python 2.7 package directory. This can happen if you do not clean your Python module build directory between builds. Please try the following:
Completely remove the 2.7 package from your Python 2.7 installation (e.g. remove /opt/anaconda/lib/python2.7/site-packages/gurobipy)
Completely remove the Python module build directory from your Gurobi installation (e.g. /opt/gurobi604/linux64/build)
Re-run the build process for the Python 2.7 module (e.g. run "python2 setup.py install" in /opt/gurobi604/linux64)
Please note that CentOS is currently a non-supported platform for Gurobi.
Thank you for the hint, I think we tried that, but did not finish the procedure in this way. We tried to clean the system but in that particular case still hat both python Versions (due to other applications that use 3.4) on the machine. Our solution in this case was just to reinstall everything clean on a Ubuntu 14.04 VM. Since then no further problems occured. (I know not the cleanest solution.)
We had some similar issues when we updated to Gurobi 6.5, but that could be solved when corrctly addressing the usual path issues.
Thank you in any case for the reply, I think this really will help us with the next, then clean deployment :-)

PyFITS installation error python version 3.3 is needed, which was not found in registry

When I try to install PyFITS I get the following error
python version 3.3 is needed, which was not found in registry
But I do have python 3.3 installed as well as numpy and Scipy. I would appreciate any help sorting this out. Thanks
OS---Windows 7 64bit
Python----3.3.2
This problem is actually addressed in the latest Astropy installation troubleshooting docs: http://docs.astropy.org/en/v0.2.4/install.html#the-windows-installer-can-t-find-python-in-the-registry
This issue is not unique to PyFITS, and has to do with whether or not the installation executable was built with UAC support, as well as whether your Python installation was installed "For all users" or "For the current user", as that affects which registry hierarchy Python installs its relevant keys into.
The script linked to in that documentation should fix up your registry with the correct entries so that the correct Python installation can be found regardless of how it was installed. But as with anything that messes with the registry please do handle with care.

Resources