Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Installing python packages

    Dear all,

    I'm having trouble installing python packages in stata 16 (numpy and pandas) using my mac; per this blog thread https://blog.stata.com/2020/09/01/st...thon-packages/

    Typing
    Code:
    shell
    into stata, X Quartz opens (rather than terminal; I assume this is okay).

    Typing pip3 -V confirms I have pip and python 3.8 installed
    Code:
    pip3 -V
    pip 19.2.3 from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8)
    However, when I try to install numpy, I am met with the following error message:
    Code:
    pip3 install numpy
    Collecting numpy
      Using cached https://files.pythonhosted.org/packages/33/1a/d10d1c23d21c289a3e87e751a9daf0907e91665cab08d0c35033fd4f5b55/numpy-1.19.2-cp38-cp38-macosx_10_9_x86_64.whl
    Installing collected packages: numpy
    ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/3.8'
    Consider using the `--user` option or check the permissions.
    Of note;
    Code:
    pip install numpy
    bash: pip: command not found
    I have searched previous stata forum chats and not been able to find any answers; I would really appreciate any help anyone can offer.

    Thanks for your consideration. William

  • #2
    The error message suggests to add --user to your command, have you tried that.
    Code:
     
     pip3 install numpy --user
    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

    Comment


    • #3
      Thanks so much, that worked perfectly. I really appreciate it.

      Comment

      Working...
      X