Am I right that 'brew python install --universal' is gone? - python-2.7

I'm in need of running some old wx stuff with python in 32-bit mode (arch -i386 python wx.py) under brewed python, macOS 10.12 will just give
arch -i386 python
arch: posix_spawnp: python: Bad CPU type in executable
What's the easiest way forward?
the macOS pre-installed one still works and I got the brew libraries working by symlinks (there is probably a better approach)
sudo ln -s /usr/local/Cellar/wxpython/... /Library/Python/2.7/site-packages/wx
arch -i386 /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python
but I'd prefer an approach where I can rely on brew and pip
I hope I'm just missing out on something obvious on how to get --universal support back using brew.

--universal has been deprecated in Homebrew 1.1.8 and slowly removed from existing formulae since. The reason behind is that "macOS has been 64-bit only since 10.6". You thus can’t rely on Homebrew for this.

Related

Install OCaml with graphics on mac with homebrew 2.0.0 (-with-x11 no longer possible)

Is there an alternative way to install the graphics module for use with ocaml on mac?
Previously, I had used
brew install ocaml --with-x11
This no longer works, as the package option is no longer supported with brew 2.0.0. Is there another way to get graphics working in ocaml on Mac without this option? I am running Sierra 10.12.6, but am working with a large group running many different mac versions that all need to be able to do this install.
I have had several problems with OCaml and brew. The best option is perhaps to completely remove brew's ocaml, as brew does not support old OS X versions (El Capitan is now unsupported). You can use the OCaml Package Manager opam instead.
To remove OCaml if already installed via brew, type
brew remove ocaml
then verify that there isn't any ocaml* remaining file in /usr/local/bin.
Install opam :
sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)`
Install OCaml and the Graphics module :
opam init --comp=4.07.1
opam install graphics
If not already installed, you may also need to download XQuartz.

how to install cvxopt on windows 7 64 bit machine for python 3.5 of anaconda?

Please suggest step by step method to install cvxopt on Windows7 64 bit machine for python version 3.5. I'm really facing hard time to install it.
Above is the error i'm getting.
After doing : conda install -c omnia cvxopt=1.1.8 on cmd,I am getting below error:
I suppose you tried something like pip install cvxopt which will resolve to compile from sources which is sometimes kind of trouble on windows depending on your setup (compilers, build-tools, ...).
As you are already using Anaconda i recommend using builds of others.
conda install -c omnia cvxopt=1.1.8
The link suggests that it's the most recent version and supporting win64.

How to get "g++ -mx32" to work on RHEL 7.2

I am new to x64_86, but forced to use it because RedHat dropped its 32-bit OS support in RHEL 7.x. I have to complile a lot of code, and am not ready to jump to x64 yet (because I do not need 64-bit addresses and do not want to face all related porting issues). So I have considered using -m32 and -mx32, and decided that -mx32 is the best route for me. However, while -m32 works fine on my build machine, when I use -mx32, I get this error:
In file included from /usr/include/features.h:399:0,
from /usr/include/string.h:25,
from zz.cpp:1:
/usr/include/gnu/stubs.h:13:28: fatal error: gnu/stubs-x32.h: No such file or directory
# include <gnu/stubs-x32.h>
^
compilation terminated.
I searched the web for solutions and some links indicate that I have to install some mysterious "multilib" rpms for g++ and gcc, however, I cannot find these anywhere. Others suggest that I have to install Linux in the x32 mode and build libgcc for x32, which sound extreme. Any ideas or leads? Did someone actually try g++ -mx32? Maybe it is not even supported on the RH platform... Thanks!
P.S. In order to get the "-m32" option to work I had to install:
yum install glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 ncurses-devel.i686
This one fails (yum cannot find these RPMs) - allegedly these are required for -mx32 to work:
yum install gcc-multilib g++-multilib
:(
Multilib is indeed your answer, but do not know why your repo does not support it. I installed mine via apt-get:
sudo apt-get install gcc-multilib
Although it uses 64-bit instructions, it uses the 32-bit ABI so annoyingly will not run under WSL (Windows Linux subsystem), which only supports the 64-bit one.

Matplotlib install issues. Pip Centos - Freetype "Missing" when it is installed

I am using a virtualenv for a django setup. I am trying to build a view that pulls data from logs and then graphs the data. Eventually I would like to have this real-time and live. If you have any recommendations on other solutions that would suit my project best, please do not hesitate to include them in the comment fields below.
I have attempted to install matplotlib from pip using pip install matplotlib.
I receive the following message:
* The following required packages can not be built:
* freetype
I then validated that it was installed
yum install freetype
Package freetype-2.3.11-14.el6_3.1.x86_64 already installed and latest version
I then found that there is a python-matplotlib which is an older version .99. However, I want to keep this inside of the virtual environment and not system wide.
find / -name *freetype*
/var/lib/yum/yumdb/f/d2807dcfe3762c0b9f8ef1d9bf0f05788e73282a-freetype-2.3.11-14.el6_3.1- x86_64
/usr/lib64/libfreetype.so.6.3.22
/usr/lib64/libfreetype.so.6
/usr/share/doc/freetype-2.3.11
I searched all over stackoverflow and only saw solutions for ubuntu which did not transfer over to centos.
Thank you for your time,
John
pip is going to compile matlibplot on your local machine, so you'll need freetype development headers installed as well.
CentOS 6+, Fedora, etc.:
$ sudo yum -y install freetype freetype-devel libpng-devel
On older operating systems (e.g. CentOS 5), you may run into a more specific freetype versioning issue with newer releases of matlibplot. If you're version agnostic, sticking with a legacy 1.3.x release will negate these dependency issues:
$ pip install matplotlib==1.3.1
Please note, you may need to downgrade your numpy to 1.8 in order to make matplotlib 1.3 work.
$ pip install numpy==1.8
Good luck!
I have just had a similar (albeit not exactly the same) situation. I'll write it up here as this page comes up among the first search results.
CentOS 5
pip install matplotlib complains about freetype
Both freetype and freetype-devel are installed.
~/.pip/pip.log provides the explanation of the problem. There is the line:
freetype: no [Requires freetype2 2.3 or later. Found 2.2.1.]
Obviously, the solution is either to upgrade freetype or downgrade matplotlib.
The second is easier (assuming I am OK with the older version).
pip install matplotlib==1.3.1 works fine.
On the matplotlib installation, this is what I did. Not sure if this is going to help you. Just followed the steps here:
http://pkgs.org/centos-6/centos-x86_64/python-matplotlib-0.99.1.2-1.el6.x86_64.rpm.html
I did not use pip, btw and have CentOS 6.4.
I had this happen to me in two different situations, see if yours is one of them:
freetype was installed, but not in the $PATH yet. Just exiting the shell and starting a new one fixed this.
I was building matplotlib from source, and trying to build from the master branch. After I switched to v1.3.x it correctly detected freetype.

how do i build gcc on a mac?

I'd like to build the latest version of gcc on a mac. I have the latest xcode but I'm looking for some of the c++0x features that are in more recent versions (the lambda functions, etc).
Are there any good step-by-step tutorials on doing this?
You should look at the Homebrew project.
Homebrew allows you to do things like this:
brew install gcc
Mac homebrew installation instructions are available here.
Add GCC support to a fresh Xcode 4.2 installation using this homebrew formula:
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb
Upgrading from Xcode 4.1 doesn't drop existing GCC support, so this formula is only useful if you're working with a fresh 4.2+ installation.
One option is to install MacPorts and install the gcc46 package:
sudo port install gcc46
Another option is to download the source code and build it as follows:
tar xzvf gcc-4.6.0.tar.gz
cd gcc-4.6.0
./configure
make
Note that GCC 4.6.0 requires as prerequisites GMP 4.2+, MPFR 2.3.1+, and MPC 0.8.0+. If ./configure fails, it's probably because you're missing one of these (though it should give you a helpful error message in any case).
Building will take a while—likely several hours, depending on your hardware.
I would suggest building it yourself (Adam details how to do so). This will give you fine control on where to install and all the options you want to select. My experience from having multiple versions of gcc is that, if care is not taken apple's version of gcc can be damaged.
To speed up gcc installation you might want to look at --enable-languages option. If there are languages you don't need installed with the new gcc then you may not want to select them.