Reputation: 809
I'm trying to use scrapy with python 2.7. I've installed scrapy succesfully, but when I try to import the module I get a message saying "unknown module".
So I have some super basic questions regarding installing python modules in pycharm:
1) How do I make sure that a module is installed on the correct project path? I spent a week recently installing pyqt4 and I really want to get a good understanding of how directories/paths work, so that I don't have to enter random commands in my terminal and hope I get lucky.
2) Why is it possible to install some modules directly through Pycharm in the project interpeter and do you need to install others manually with pip or homebrew?
Thanks in advance!
Upvotes: 0
Views: 2044
Reputation: 4647
The default location for packages installed via pip
for Python 2.7 on Mac OS X is /Library/Python/2.7/site-packages/
.
You can see where packages are located using pip show <package_name>
. For example, if I wanted to know where my requests
package is located, I would run pip show requests
.
virtualenv
. Virtualenv creates environments that have their own
installation directories that don't share packages with other
virtualenv
environments. This is a very popular option many people
use when managing projects.pip
as they both look to the Python Package Index (PyPI) as their repository by default. Make sure you don't have another repository set if you want results from pip
and PyCharm to be consistent.Hope this helps!
Resources:
Upvotes: 1