miniforge | A conda-forge distribution
kandi X-RAY | miniforge Summary
kandi X-RAY | miniforge Summary
This repository holds a minimal installer for Conda specific to conda-forge. Miniforge allows you to install the conda package manager with the following features pre-configured:. It can be compared to the Miniconda installer.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of miniforge
miniforge Key Features
miniforge Examples and Code Snippets
Community Discussions
Trending Discussions on miniforge
QUESTION
I just got my new MacBook Pro with M1 Max chip and am setting up Python. I've tried several combinational settings to test speed - now I'm quite confused. First put my questions here:
- Why python run natively on M1 Max is greatly (~100%) slower than on my old MacBook Pro 2016 with Intel i5?
- On M1 Max, why there isn't significant speed difference between native run (by miniforge) and run via Rosetta (by anaconda) - which is supposed to be slower ~20%?
- On M1 Max and native run, why there isn't significant speed difference between conda installed Numpy and TensorFlow installed Numpy - which is supposed to be faster?
- On M1 Max, why run in PyCharm IDE is constantly slower ~20% than run from terminal, which doesn't happen on my old Intel Mac.
Evidence supporting my questions is as follows:
Here are the settings I've tried:
1. Python installed by
- Miniforge-arm64, so that python is natively run on M1 Max Chip. (Check from Activity Monitor,
Kind
of python process isApple
). - Anaconda. Then python is run via Rosseta. (Check from Activity Monitor,
Kind
of python process isIntel
).
2. Numpy installed by
conda install numpy
: numpy from original conda-forge channel, or pre-installed with anaconda.- Apple-TensorFlow: with python installed by miniforge, I directly install tensorflow, and numpy will also be installed. It's said that, numpy installed in this way is optimized for Apple M1 and will be faster. Here is the installation commands:
ANSWER
Answered 2021-Dec-06 at 05:53Since the benchmark is running linear algebra routines, what is likely being tested here are the BLAS implementations. A default Anaconda distribution for osx-64 platform is going to come with Intel's MKL implementation; the osx-arm64 platform only has the generic Netlib BLAS and the OpenBLAS implementation options.
For me (MacOS w/ Intel i9), I get the following benchmark results:
BLAS Implmentation Mean Timing (s)mkl
0.95932
blis
1.72059
openblas
2.17023
netlib
5.72782
So, I suspect the old MBP had MKL installed, and the M1 system is installing either Netlib or OpenBLAS. Maybe try figuring out whether Netlib or OpenBLAS are faster on M1, and keep the faster one.
Specifying BLAS ImplementationHere are specifically the different environments I tested:
QUESTION
I tried to install the sf
package because it is a dependency for tidycensus
, which is the package I'd like to use.
I am using a Mac with Big Sur. Per the Github for r-spatial, I tried following the installation instructions here but no dice. My sessionInfo()
:
ANSWER
Answered 2022-Mar-23 at 00:59The solution, thanks to @IRTFM, was to download the binary from CRAN, then use R CMD INSTALL
. Then I could install tigris
and tidycensus
via install.packages()
QUESTION
I've been using Anaconda for a few years now, but since I started using a Mac with a M1 processor I had to deal with a bunch of problem with the installation of some packages, which left me a little confused about some basic concepts.
For example, I was trying to install Tensorflow, and it turns out the proper way is to install miniforge, and get Tensorflow from the conda-forge channel (which is the default for miniforge), as explained here. Then, I was wondering whether I could do the same using Anaconda/Miniconda...set up the conda-forge channel as default, and install Tensorflow (or any other arm-compatible package), but I've been told it's not possible
So, now I'm trying to understand how this all works. If a Tensorflow version compatible with M1 processors exists in the conda-forge channel (and it does exist), why can't I install it by using Anaconda/Miniconda, after configuring it to use said channel? To phrase it in another way, what is the difference between Anaconda/Miniconda and Miniforge, other than the channels they look into for packages (and, as I understand, some licenses)?
Here there is a similar question, but the answers don't seem to address my main concern (why Anaconda/Miniconda with conda-forge as default channel is different than miniforge).
...ANSWER
Answered 2022-Mar-21 at 07:43It's not impossible, but you'll have to jump through hoops to get it done.
First, if you have an Anaconda installation, you can't install conda-forge packages into the base environment consistently, because the anaconda
package in the base environment of Anaconda will conflict with packages from conda-forge.
Second, since Anaconda is only x86_64 at the moment, you can only install it via Rossetta emulation. After that, you need to tell conda that you need arm64 compatible packages by setting the env variable CONDA_SUBDIR.
QUESTION
I just started a new job, and they gave me a Mac pro to work with. I was reading about the new M1 processor and everything, I found this article particularly useful.
However, I still have one doubt about it. If I didn’t misunderstand, in the article they suggest using either Anaconda (with Rosetta2 translation), OR to install Miniforge, which sets conda-forge as default and only channel, in order to download packages compiled specifically for the M1. I found different tutorials, and they all suggest using Miniforge to install packages on the M1.
My question is…can’t I just use Anaconda, and set conda-forge as the only installation channel, to get M1-compiled packages, like it would do with Miniforge? Or am I misunderstanding something? Thanks!
...ANSWER
Answered 2022-Mar-14 at 08:57I stand corrected. A bit of explanation: In each channel, there exist subdirs for different OS and architectures. When you install conda
, then it will automatically look in the correct subdir for all channels that you configure. The difference between a conda that was installed for arm and x64 will be in what subdirs it looks. E.g. for my conda
on a linux machine (installed through miniconda) where I added the conda-forge
channel manually, the list of channels actually looks like this:
QUESTION
When I try to run the (simplified/illustrative) Spark/Python script shown below in the Mac Terminal (Bash), errors occur if imports are used for numpy
, pandas
, or pyspark.ml
. The sample Python code shown here runs well when using the 'Section 1' imports listed below (when they include from pyspark.sql import SparkSession
), but fails when any of the 'Section 2' imports are used. The full error message is shown below; part of it reads: '..._multiarray_umath.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')
. Apparently, there was a problem importing NumPy 'c-extensions' to some of the computing nodes. Is there a way to resolve the error so a variety of pyspark.ml
and other imports will function normally? [Spoiler alert: It turns out there is! See the solution below!]
The problem could stem from one or more potential causes, I believe: (1) improper setting of the environment variables (e.g., PATH
), (2) an incorrect SparkSession
setting in the code, (3) an omitted but necessary Python module import, (4) improper integration of related downloads (in this case, Spark 3.2.1 (spark-3.2.1-bin-hadoop2.7), Scala (2.12.15), Java (1.8.0_321), sbt (1.6.2), Python 3.10.1, and NumPy 1.22.2) in the local development environment (a 2021 MacBook Pro (Apple M1 Max) running macOS Monterey version 12.2.1), or (5) perhaps a hardware/software incompatibility.
Please note that the existing combination of code (in more complex forms), plus software and hardware runs fine to import and process data and display Spark dataframes, etc., using Terminal--as long as the imports are restricted to basic versions of pyspark.sql
. Other imports seem to cause problems, and probably shouldn't.
The sample code (a simple but working program only intended to illustrate the problem):
...ANSWER
Answered 2022-Mar-12 at 22:10Solved it. The errors experienced while trying to import numpy c-extensions involved the challenge of ensuring each computing node had the environment it needed to execute the target script (test.py
). It turns out this can be accomplished by zipping the necessary modules (in this case, only numpy
) into a tarball (.tar.gz) for use in a 'spark-submit' command to execute the Python script. The approach I used involved leveraging conda-forge/miniforge to 'pack' the required dependencies into a file. (It felt like a hack, but it worked.)
The following websites were helpful for developing a solution:
- Hyukjin Kwon's blog, "How to Manage Python Dependencies in PySpark" https://databricks.com/blog/2020/12/22/how-to-manage-python-dependencies-in-pyspark.html
- "Python Package Management: Using Conda": https://spark.apache.org/docs/latest/api/python/user_guide/python_packaging.html
- Alex Ziskind's video "python environment setup on Apple Silicon | M1, M1 Pro/Max with Conda-forge": https://www.youtube.com/watch?v=2Acht_5_HTo
- conda-forge/miniforge on GitHub: https://github.com/conda-forge/miniforge (for Apple chips, use the
Miniforge3-MacOSX-arm64
download for OS X (arm64, Apple Silicon).
Steps for implementing a solution:
- Install conda-forge/miniforge on your computer (in my case, a MacBook Pro with Apple silicon), following Alex's recommendations. You do not yet need to activate any conda environment on your computer. During installation, I recommend these settings:
QUESTION
My code snippet is below -
...ANSWER
Answered 2022-Mar-01 at 07:28Interestingly, the error comes from the absence of an Input
layer.
This for example would work:
QUESTION
I'm using the following Make to build OpenCV from source,
...ANSWER
Answered 2022-Feb-10 at 18:05I think that you've installed ffmpeg 5 and OpenCV is not yet compatible with it. Please try the following:
QUESTION
I wanted to install the sklearn package in PyCharm. However, I always got the same error (below is an extract):
...ANSWER
Answered 2022-Feb-07 at 12:38I think the easiest approach is to create a conda environment from PyCharm. Go to the python interpreter settings and create a new conda environment from there. Then, install packages with conda inside that environment, all from inside PyCharm.
Technically speaking, you're never installing anything into PyCharm, but into a python installation, which can again either be a virtualenv or a conda env (env as in environment). If you manage to point PyCharm to the correct python executable, you should be good. On the other hand if you're conda/pip installing into some other environment in the terminal, you'll just be confused. Since I don't have an M1 Mac I can't say exactly where you went wrong, though.
QUESTION
I am unable to install any packages with miniforge 3 (conda 4.11.0).
I am attempting this on a Jetson Nano Developer Kit running Jetpack. Initially it had conda installed but it seems to have gone missing, so I decided to reinstall conda. It looks like the base version of anaconda/miniconda is having issues running on ARM processors, and so I downloaded miniforge which apparently is working.
I have set up an environment successfully, but attempting to download pytorch gives the following error:
...ANSWER
Answered 2022-Feb-03 at 09:37There is no linux-aarch64
version of pytorch on the default conda channel, see here
This is of course package specific. E.g. there is a linux-aarch64
version of beautifulsoup4
which is why you wre able to install it without an issue.
You can try to install from a different channel that claims to provide a pytorch for aarch64, e.g.
QUESTION
I installed Python on my Apple M1 using miniforge
...ANSWER
Answered 2021-Dec-10 at 18:55Homebrew builds native ARM/M1 binaries on Apple Silicon now. Matlab is an x64 binary running under Rosetta emulation. I suspect the problem is that you can't load an ARM library (Homebrewed Python) into an x64/Rosetta process (Matlab). I bet macOS's system Python distribution is a "universal" build or similar thing that can load in to either kind of process.
You can probably get this to work by installing an x64 version of Miniforge or Anaconda outside Homebrew, and telling Matlab to load that.
Have a look at https://www.anaconda.com/blog/apple-silicon-transition.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install miniforge
For non-interactive usage, look at the options by running the following:.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page