tastyminerals
tastyminerals

Reputation: 6548

What is the difference between MacPorts py38-pandas and PyPi pandas?

I've just switched to MacBook M1 machine and having trouble installing pandas. I noticed that in addition to PyPi pandas there is a MacPorts py38-pandas package. I could not install the PyPi pandas due to some compilation error but successfully build and installed MacPorts version. However, after installing the py38-pandas I still cannot import pandas in Python3 interpreter.

What is the purpose of these MacPorts Python packages and how are they different? Can I make MacPorts py38-pandas importable in Python 3 interpreter?

I intentionally do not use homebrew.

I have installed python38 via MacPorts and made it available in shell. So, python3 starts Python 3.8 which was installed via MacPorts.

Upvotes: 0

Views: 110

Answers (1)

Snail Shell
Snail Shell

Reputation: 26

You are using the preinstalled python3, not the MacPorts version.

Perhaps you should read the accepted answer of How to: Macports select python to understand what happens.

Basically you need to set your PATH, that you are using the MacPorts python3 which is usually installed to /opt/local/bin/python3.

This is done by the MacPorts in your $HOME/.profile by adding a line like:

export PATH="/opt/local/bin:/opt/local/sbin:$PATH"

Upvotes: 1

Related Questions