Python(x,y): MinGW installation - MWE - python

Background
I reinstalled Python(x,y) on my Windows 7 machine. When I finished the installation I wanted to upgrade all packages using pip. But the mingw compiler gives some weird error messages.
My last question could hopefully get resolved by this issue: Python: Install sip
Therefore I checked out an example online that builds C code for Python using mingw. But it failed - that might be an indication that mingw is not working as intended. I have some details if this helps anything:
mingw32-make --version 3.82.90
gcc --version 4.8.1
python --version 2.7.10
I configured Python (C:\Python27\Lib\distutils\distutils.cfg) according to the qutip installation guide and https://docs.python.org/2/install/#location-and-names-of-config-files.
Issue
I want to test my mingw installation since I cannot upgrade the Python packages with pip. Please give me some tested code to check if my installation is working properly together with Python.

Related

ERROR: Failed building wheel for dlib on MacOS Catalina

I'm trying to get eye tracking on python. I've installed openCV and everything required except dlib. When I first tried it, It just went into a "Building wheel for setup.py" Loop. I've looked around on stackoverflow and I tried following This Tutorial to install it with homebrew, and I've tried using This to log all the errors. By doing this I see a lot of warnings, but it gets to about 98% before failing and trying again. Here's what I'm using:
MacOS Catalina Version 10.15.7
Visual studio 2019(although I don't know if that matters)
Python 3.8
I have CMAKE version 3.18.2(when running cmake --version)
If it helps, when I do pip install cmake it says it's already installed for python3.5, but will work for python 3.8.
Any tips would be appreciated. I can give more info aswell

Python 3.5 on Windows10 - unable to install cx_freeze - 'cxfreeze-postinstall' does not exist

I'm trying to install cx_freeze on python, and its just doesn't seem to work. I've tried both through pip in the command line (python -m pip install cx_freeze) and through pycharm community add packages.
At first it gave the notorious unable to find vcvarsall.bat - but I installed visual studios latest with all the c++ compilers.
Now it gives another error message - cxfreeze-postinstall does not exist:
enter image description here
Please help me!
Well, I tried installing the win32 version - and it worked... Have no idea why, since my computer is a 64bit OS with a 64bit processor, and I've only installed 64bit version of stuff until now.
UPDATE: well, the cx_freeze installs, but I still can't manage to get an executable file. I think maybe this module/package is not compatible with python 3.5 - I will later try it on 3.4 and see if it works.
UPDATE_2.0: Works great on Python 3.4 - so I guess there's some problem with the package compatibility with Python 3.5

mac following brew install python warning thrown unstable state

Pundits warn against installing python in a mac usr/bin/Frameworks area.
Python self-installers write to Framework by default.
pundits advise using brew install of python to avoid the above.
Brew install python however, results in unstable state
Idle reports tclsh mismatch.
Pundits advise active state installer of correct tclsh. These are high-level python cognoscenti, and real pundits, lilies amidst the thorns.
Active-state installs to Frameworks (can you imagine?).
The said installer allows no other installation directory.
Brew installed python fails to see the active-state tclsh.
However, if one of you admonitory pundits could help me with a logical, non-idiomatic description of a process that will associate the appropriate "tclsh" in usr/bin with python3 in usr/local/bin, I would be ecstatic.
Homebrew's Python build will only attempt to recognize brewed or system Tcl/Tk. To build against Homebrew's Tcl/Tk (and install it first if necessary), install Python with brew install python3 --with-tcl-tk.

How can I fix my python installation?

For some work I'm doing at my office I needed to downgrade my python version from 2.7.9 (OS X default installation) to 2.7.6. It seemed the easiest way to do this would be to uninstall python and then reinstall the older version. After following the instructions here and then running the official Python 2.7.6 installer. I then tried to just run python in the terminal to make sure the installation worked and received this error:
-bash: /usr/local/Cellar/python/2.7.9/bin/python: No such file or directory
Running python --version gave the same results. which python yielded the following directory:
/usr/local/bin/python
Does anyone have any idea how I can fix this issue to get the right version of Python running? I'm pretty much out of ideas at this point.
The symlink in/usr/local/bin/Python is still pointing to the other version. Update it to point to the version currently installed and it should work.

pyenv and installing certain Python packages

I'm trying to install an older version of Python on my Mac. I'm currently running 2.7.9, but our production environment is running 2.7.6. (There is a compatibility issue with gevent and 2.7.9.)
I found pyenv which allows me to install various versions. I've installed pyenv with brew and installed 2.7.6. I then created a virtualenv with 2.7.6 with the following command:
mkvirtualenv my_env --python=/Users/dustin/.pyenv/versions/2.7.6/bin/python
It seems to work fine and I'm running Python 2.7.6. The problem I am running into is that I can't install certain packages with pip such as Cython or M2crypto. I get C compile errors.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
If I create a virtualenv without specifying the Python version, these packages install fine. How do I fix this?
It could be due to trying to run an older version of Python 2.7.x (like 2.7.6) on newer releases of OS X. If you are on OS X 10.10, that's very likely the problem. See http://bugs.python.org/issue21811. You may need to add at least the patch for _osx_support.py. If not, try running pip with -v and update your question with the results.
Update: With the additional information you supplied, it is clear that you are running into the OS X 10.10 support issues that were fixed in the changes for Issue21811 released in 2.7.8. In particular, the configure changes are needed to correctly parse the two-digit minor version number (10); otherwise, the code in configure mistakenly thinks you are are running on a very old version of OS X and generates obsolete link directives. You should backport https://hg.python.org/cpython/rev/2672e30d9095 and https://hg.python.org/cpython/rev/a7ab09e00dbc.

Categories

Resources