[Python] How do I install pip in my python3, but not miniconda?

Discussão em 'Python' iniciado por Stack, Fevereiro 14, 2025.

  1. Stack

    Stack Membro Participativo

    I'm having issues installing pip in my python3. Also not sure if I'm setting up python and miniconda in the right location (If there is best practice, please advise). I believe I have install pip in my miniconda, but not my python3 (hence I can't import the packages in my python3.11 either). How would I fix this problem?

    (base) jennykao@Haos-MacBook-Pro ~ % which python
    python: aliased to /usr/local/bin/python3
    (base) jennykao@Haos-MacBook-Pro ~ % pip -V
    pip 25.0.1 from /Users/jennykao/miniconda3/lib/python3.12/site-packages/pip (python 3.12)
    (base) jennykao@Haos-MacBook-Pro ~ % pip install numpy
    Requirement already satisfied: numpy in ./miniconda3/lib/python3.12/site-packages (2.2.3)
    (base) jennykao@Haos-MacBook-Pro ~ % python
    Python 3.11.1 (v3.11.1:a7a450f84a, Dec 6 2022, 15:24:06) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import numpy as np
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'numpy'
    >>> Í

    Continue reading...

Compartilhe esta Página