Conda build a 32 bit package on a 64 bit machine - python

I have been using conda as a package manager for a lot of my work and its really helped keep the environments of multiple people in check with both Python and binary packages. Its been all sunshine and rainbows while all of my users have been on 64-bit Linux machines.
Now I need to support a handful of 32-bit machines. Is there any way to build 32-bit versions of my packages on my 64-bit machine?
I've found this answer on SO, How to compile a 32-bit binary on a 64-bit linux machine with gcc/cmake but I can't figure out how to get it to compile and upload both 32 and 64 bit versions.

conda assumes that the entire installation is 64-bit, so the first thing you'll need to do is create a separate Miniconda installation for 32-bit building. Then build your recipe. If the package links against any system libraries, you'll need to have the 32-bit versions installed. I personally find it easiest to build 32-bit packages on a 32-bit VM, as then you know that everything is 32-bit, but building on a 64-bit machine is possible and it should work (although I would recommend testing the package on a 32-bit machine).

Related

Installing Anaconda or Python on Sun Solaris 11.4 with Sparc architecture

I am trying to install Python or anaconda on Sun solaris 11.4 system with Sparc architecture. Somebody has idea on the python or anaconda installer compatible to same
The following info is from Python.org
Python for Solaris
You can purchase ActivePython (commercial and community versions, including scientific computing modules, not open source), or build from source if you have a C compiler.
UNIX Packages has a variety of Python versions for a variety of Solaris versions. These use the standard Sun pkgadd.
As far as I know, Anaconda supports ONLY Windows, MacOs and Linux.
Above the facts, now the opinions...
In my experience building Python from source is easy, but when you want to pull in the scientific stack (Numpy, Matplotlib, Scipy, Cartopy etc) building from source becomes more complicated (I don't know if you can pip these libraries pre-built for Solaris).
I've learnt, reading this and this that Solaris indeed comes with Python, but this pre-installed Python issue is meant, essentially, for use by a large number of important OS components and you'd better leave it alone.
If, for your development, you can use the system's Python as is, no other modules installed, no newer versions etc, then you're OK
On the other hand, the documents linked above details the practices Oracle
suggests to install additional packages w/o disrupting the system's Python.
Be careful...

How do I explicitly install and launch the 64-bit version of Python after installing the Python.org distribution?

I just installed the latest version of Python from enter link description here. I expected the installer to query my CPU at installion time and install the a 64-bit version by default, since my CPU machine is 64-bit Intel version.
After installation, I am a unclear by the version data that shows in IDLE when I start Python:
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32
I want to use highest performance Python for machine learning, database, and number crunching applications.
There is no "64-bit only" version on Python.org website. The only kit available is named Windows x86-64 executable installer Windows for AMD64/EM64T/x64.
Does the Python installer install both the 32-bit and 64-bit API? This is not reflected in the version information that is displayed.
Am I asking the wrong question, because the 64-bit and 32-bit APIs are both installed, and just the version displayed is not complete? How does Windows or Python know to switch to the 64-bit API for libraries like Numpy, Numba, etc. that work best with 64-bit code?
Is there a way to explicitly start the 64-bit version?
When should I do this explicitly versus letting Windows launch the default 32-bit version?
you should only download and install the Windows x86-64 executable installer Windows for AMD64/EM64T/x64. if you want 64bit. However do NOT expect python to be super fast, as a dynamic typing language, it will be at least 100 times slower than static typing language such as C/C++ or Java.
If you want your numpy/pandas/sklearn to be as fast as possible, you should focus on optimizing your workflow, don't commit to unnecessary task. Or you can check out intel's python distribution if you're on Intel CPU. Or explore other multi-process pandas solution when on a multi-core AMD cpu.

Anaconda 64 bit on Ubuntu 32 bit

I want to use the mlbox package (see here) which works with a 64-bit version of Python only. But I have a 32 bit version of Ubuntu, can I install a 64-bit python without any problem ?
PS : I've already installed 32-bit anaconda.
No, 64-bit software requires a 64-bit operating system, or at least a 64-bit kernel.
You may be able to run 64-bit Anaconda in a virtualization environment, or you may be able to upgrade just your kernel to 64-bit (seems unlikely to me though). Here are a couple of links with more info:
https://unix.stackexchange.com/questions/118343/run-64-bit-app-on-32-bit-system-ubuntu
https://superuser.com/questions/111975/can-i-run-64-bit-executables-on-a-32-bit-linux
I am pretty sure it won't work, or if it will (which is less likely) it will have bunch of bugs and have some issues. I would not recommend doing it, because it is just a waste of time.
what I recommend you doing is download the Oracle the Virtualbox (click here)
and try running the 64-bit version of your Linux Ubuntu and try running the Python. Basically try doing this whole process through the virtual machine.
Good Luck with your project !!! I hope I helped you.

Scipy on Python 3.5 - manual installation

I downloaded scipy-0.16.1-win32-superpack-python3.4.exe and tried to install it on WinServer 2008 R2 64bit with Python 3.5 preinstalled. SciPy returns error saying that Python 3.4 not found. My server does not have Internet connection, so I have to download and move files manually. Any suggestions? Should I just try to downgrade to Python 3.4? Is it easy to downgrade?
Christoph Gohlke's binaries for Python on Windows are a godsend when you need to install a package that requires a C compiler, like numpy or scipy, though he only tends to host binaries for the latest versions of the packages (but for all current versions of CPython).
When installing these binaries, make sure that the platform on the binary (usually win32 or win_amd64) matches the type of Python you installed (32-bit or 64-bit), and note that it may not match your OS's bit-ness if you installed a 32-bit version of Python on a 64-bit OS.
Since you apparently have a 64-bit version of Python 3.5 installed, the wheel you want is scipy‑0.16.1‑cp35‑none‑win_amd64.whl.

Which enthought canopy distribution should I install?

I am running 32 bit Python on a 64 bit system. Which enthought canopy distribution should I install? The 32 bit or the 64 bit?
In other words, do I match the operating system I am using or do I match the Python I am using?
You install a 64bit Operating System.
And you should install a 32bit Python version only if:
The libraries you intend to use does not support a 64bit Python version.
You intend to build your .py into a .exe
You're testing something specific related to the 32bit arch.
Otherwise, install a 64bit Python and a newer python version (Python 3.X) if possible.

Categories

Resources