Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRabih Atallah
3,405 PointsQuestion regarding pip
Every time I write: pip install module (a module from python packages) in the IDLE, I receive a syntax error. should I use 'pip install module' in the IDLE or in the terminal. I use a mac.
1 Answer
Chris Freeman
Treehouse Moderator 68,441 Pointspip install module
should be run on the shell command line prompt. You will get a syntax error trying to run pip
as a python command in the interpretor.
Rabih Atallah
3,405 PointsRabih Atallah
3,405 PointsThanks for the clarification...
Rabih Atallah
3,405 PointsRabih Atallah
3,405 PointsHi Chris. Please how can I install numpy. I have python 3.4 installed. Whenever I run this command in my Terminal: pip install numpy. I get this :
Rabihs-MacBook-Air:~ rab$ pip install numpy Requirement already satisfied (use --upgrade to upgrade): numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python Rabihs-MacBook-Air:~ rab$
but when I import numpy in Python 3.4 , I get an error. It seems MAC OS comes with an embedded Python 2.7 with numpy already installed. How can I transfer numpy to Python 3.4
Chris Freeman
Treehouse Moderator 68,441 PointsChris Freeman
Treehouse Moderator 68,441 PointsIf you're on a system with Python 2.x as the system default, but also have Python 3.x installed, you need to run
pip3
to get the Python 3 version of pip to install into the Python 3 site-packages area. Can you try:pip3 install numpy
Rabih Atallah
3,405 PointsRabih Atallah
3,405 PointsThanks so much! it worked