![]() For abbreviation purposes I will only use Makefile targets for the description. All commands and steps are provided in the Git repository. Each container is also emulated as 圆4, which makes it possible to install every package as before on prior Macbooks. The final approach I tried and which led to success was using Docker and running the required environments as containers. Thus, not seeing any way to succeed here, I searched for a different way. ![]() Unfortunately, I didn’t find out how to set the compiler correctly and for me it was intransparent what compilers and which version of Homebrew was used. The idea was to use this to install only Python 圆4 packages. ![]() The second attempt I gave a try was running the terminal in an 圆4 emulation with Rosetta2. This soon became very complicated and due to package version restrictions I abandoned this approach. Every time a package couldn’t be installed via pip (which Poetry is using in the background), I tried to install it with conda install. The first thing I tried was installing Miniforge and running poetry install, a way of installing the specified dependencies into a virtualenv. And since this is already possible with IDEs like P圜harm or VsCode, I didn’t want to miss out on this feature when changing to a new architecture. Everyone who develops on a regular basis knows how much time it can save to investigate the variables and behavior step by step in an interactive manner. Besides the reproducibility of the environment, another mandatory feature is the possibility to debug code in an easy way. It stores all package dependencies and their exact versions in files tracked with Git, which makes it possible to rerun the installation everywhere generating the same environment. A way to achieve this is using a package manager like Poetry ( ) for Python. In a Python project with multiple people involved it is crucial that the software environment is consistent across different platforms and systems. But this approach lacks the possibility of reproducible environments and therefore was not an option. There is the alternative way of using Miniforge which is a variant of Conda. In short: With pip install I was not able to get a running environment with all necessary packages installed. Furthermore, a lot of major packages like Numpy and Pandas are using C/C++ extensions for getting better performance, too. Although Python is a scripting language, this also holds true for it because the interpreter is written in C. The disadvantage, on the other hand, is that all software either needs to be emulated (with Rosetta2) or recompiled with an architecture-specific compiler for arm64 (M1) instead of x86 like before … Unfortunately, a recompilation is unlikely to work out of the box and code changes must be applied. On the one hand, the advantage of this is that Apple became independent from Intel so they could design their own chip. Then I ran into … ProblemsĪpple’s M1 chip is built on the ARM architecture in contrast to 圆4 chips used in prior Macbook versions. The whole installation started smoothly until I wanted to run my Python projects. In December last year I was privileged enough to choose a new business laptop and so I took the opportunity to get a Macbook Pro 16 with M1Pro Silicon. But for small experiments, and of course debugging, my hope was to save a lot of time. Usually, I don’t need to run long trainings of neural networks on my laptop. Last year, I got pretty excited about the announcement of the new versions of the Apple M1 chip because it offered a much higher performance. Thus, my language of choice is Python and I am using it in several projects on a daily basis. I have been working as a data scientist at codecentric for several years now.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |