2

I am having a bit of trouble getting everything to work on my Mac running El Capitan. I am running 3.5.1. I am under the impression that Pip is included with an install of the above, however when I try to use it to install sympy using the syntax in terminal: python -m pip install SomePackage, I get the error mentioned in the title. I tried running import pip in IDLE, and got no error, so I am quite confused. If I type pip into IDLE, I get:

<module 'pip' from '/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/__init__.py'>

Does anybody know what the problem is? Do I need to navigate to a certain directory in Terminal when I run the command?

Sunny
  • 25
  • 1
  • 7
  • 1
    When you use pip from the terminal, try full paths as suggested [here](http://stackoverflow.com/questions/29284282/how-to-install-in-python-3-4-whl-files). – TigerhawkT3 May 03 '16 at 00:39
  • A few answers/comments assuming the OP has not performed the basics/homework. I have the same issue *on just one of my macs' with el capitan* and have been doing scientific python on mac for a few years now: this is not a beginner/simple issue. In my case it was already verified that `pip` were on the path: yet still getting this error. – WestCoastProjects Oct 18 '17 at 22:42

1 Answers1

2

I believe that you can run it by calling pip in the terminal. If you have it already installed.

pip install sympy

ruthless
  • 309
  • 3
  • 13
  • @Sunny What you could also do is install homebrew and then reinstall pip. `brew install python` – ruthless May 03 '16 at 00:39
  • I already have homebrew installed. Are you saying that I should reinstall python or just pip? should I do `brew install pip` or `brew install python`? Sorry, I'm a bit new to this. Thanks a ton! – Sunny May 03 '16 at 00:44
  • 1
    @Sunny install pip `brew install pip`. – ruthless May 03 '16 at 01:10
  • @Sunny and if that fails then go to the pip website and download the python script `get-pip.py` and run it. – ruthless May 03 '16 at 01:20
  • I am fairly sure pip is installed. If I type it into idle it confirms it's there, and I can navigate to it through the terminal, and I see all of its files. The problem seems that terminal won't recognize pip for some reason, even though idle does. I actually tried re-installed and it didn't change anything – Sunny May 03 '16 at 01:38
  • @Sunny try running pip by '/usr/local/bin/pip' and if it run pip then you need to add that path to the environment variable. – ruthless May 03 '16 at 01:46
  • Sorry... I'm new to this, but what exactly do you mean? Do you mean go to that location in terminal and run pip there? and what do you mean environment variable? – Sunny May 03 '16 at 02:12
  • @Sunny if you just type that into the terminal anywhere it should try to run pip. The environment variable can be see with $PATH in the terminal. The computer checks those path when you type a command into the terminal. – ruthless May 03 '16 at 15:09
  • No. Not working. Whatever, not really worth it right now. Thank you so much for your help though! – Sunny May 04 '16 at 02:29