I am using python 3.6.8. When I try to import pyexpat, I get a "Module use of python38.dll conflicts with this version of Python." conflict. I checked the documentation and this module should be supported from at least 2.x+ python version. I've tried running my script both through the conda environment through visual studio (python 3.6.8) and through a priginal python 3.6.6 and 3.6.8. I am getting this error anyway.
It is very strange. How can python version 3.6.8, which I just downloaded from the official site, refer to version 3.8 if it is a clean new installed version?
There are too few tutorials on this module, but it should definitely work from early versions of python.
Have any ideas what can be done? I repeat once again that I literally run unmodified python without any modules and it still doesn't work.
Related
both versions of python interpreter are installed on my pc but when I need to call pip on command line, it's downloading libraries for 3.7 and don't really know how can I code on Python 3.6.
Need to load a library from MATLAB (matlab.engine library) to run a Simulink model on Python. it's impossible to install for Python 3.7. All that is why I try to work on Python 3.6.
by the way, I am coding on Notepad++ as editor.
Problem solved;
Although they both are on path,command line always has worked for 3.7. I changed name of 3.6 interpreter as python3.exe and call 'python3' it worked very well !
I am trying to use Python 3.6.5_1 for OpenCV, so I have switched Python versions using "brew switch python 3.6.5_1", but after checking my current version of Python using "python --version", I apparently am still using Python version 3.7.2. Any solutions? By the way, this is the tutorial I am following: https://www.pyimagesearch.com/2018/08/17/install-opencv-4-on-macos/
Check your python path to see where your python executable is being stored---which python in terminal. I bet it's still pointing to your 3.7.2 directory's python.
If you are switching between python versions, virtualenv can be used to initialize isolated environment with a specific python version.
virtualenv -p [preferred-python-version] open_cv_project_env
Or where is there a published list of the supported versions of Python for Visual Studio Code?
Also if one's machine's OS makes a difference that would be helpful to know as well.
According to their documentation, if you link to what "a supported Python", is, the requirements are "whichever version of Python you want to use". And they explicitly include:
The built-in Python installation on Linux.
An installation through Homebrew on macOS using brew install python3 (the system install of Python on macOS is not supported).
A download from python.org.
A download from Anaconda (for data science purposes).
Of course python.org has versions all the way back to 0.9.1, although I suspect anything older than the 2.0.1 in the main downloads doesn't really count.
More realistically, they probably only test with current Python versions, which as of right now means 2.7, 3.5, 3.6, and maybe 3.7 prereleases. If you wanted to use 2.5 or 3.3, you might well get syntax highlighting and error fly-checking based on 2.7 or 3.5 grammar, etc. But actually running your code should still work.
Also, if you're on a Mac and thinking of Homebrew, it's worth noting that brew install python3 will give you an error; the package is just called python now, and you install python for 3.x and python#2 for 2.x.
Microsoft's Python Extension for VS Code actually let you select an interpreter from a list of detected or manually set environments (CMD-Shift-P/Ctrl-Shift-P -> Python: Select Interpreter), so it should work with latest version of any interpreter, as long as is supported by the OS (remember that VS Code and its extensions are hosted in Electron). Source
I wanted to use mockito with python version 2.6 & 2.7.
I have downloaded the latest version of mockito package and tried to use it. But I am unable to use it. The package is imported successfully but when I am using any function it is failing.
Do you have any idea about the compatibility of mockito with python version?
I could not find any documentation around it. I mostly saw that it with python 3.0.
Help me with your suggestions or help around this?
This link shows that mockito was tested with at least the following Python versions:
Python 2.4.6
Python 2.5.4
Python 2.6.1
Python 2.7
Python 3.1.2
I have numerous versions of python installed, a system python with my mac osx (10.8), and numerous version from macports. On occation I have run into errors with different packages requiring different versions of python to run, and previously I could solve my problems by running a certain version explicitly (e.g. python2.6 <script>) or by changing my default python using port select python <python-version>.
I just struggled tremendously through installing the VTK (visualization) packages, and finally got them working by using /usr/bin/python instead of my standard /opt/local/bin/python. These are both version 2.7 (the former is 2.7.2 and the latter 2.7.5), however. Why can I only use one and not the other? Is there a way to use the /opt/ version and still have the vtk package work?
Examples of errors using the wrong python interpreter:
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
and,
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap