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 trial

Python

Problems using Django and Scrapy after installation

Hi guys!

I'm really stuck here and I'm afraid to mess things up in my system. I'm really in need of some help from you guys! I've tried installing Django and Scrapy with:

pip install django

When I run the command

python  -m django --version 

I get:

1.10.4

But when I try.. let's say

django-admin

I get:

command not found: django-admin

I'm currently running.

Python version 2.7.12

And for Scrapy this i the error message (It's a long one, and I need some help to explain what went wrong, please)

pip install Scrapy 
 pip install Scrapy
Collecting Scrapy
  Downloading Scrapy-1.2.2-py2.py3-none-any.whl (295kB)
    100% |████████████████████████████████| 296kB 2.3MB/s
Requirement already satisfied: Twisted>=10.0.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from Scrapy)
Requirement already satisfied: pyOpenSSL in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from Scrapy)
Requirement already satisfied: cssselect>=0.9 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from Scrapy)
Collecting w3lib>=1.15.0 (from Scrapy)
  Using cached w3lib-1.16.0-py2.py3-none-any.whl
Collecting queuelib (from Scrapy)
  Using cached queuelib-1.4.2-py2.py3-none-any.whl
Collecting parsel>=0.9.3 (from Scrapy)
  Using cached parsel-1.1.0-py2.py3-none-any.whl
Collecting PyDispatcher>=2.0.5 (from Scrapy)
Collecting six>=1.5.2 (from Scrapy)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting service-identity (from Scrapy)
  Using cached service_identity-16.0.0-py2.py3-none-any.whl
Collecting lxml (from Scrapy)
Requirement already satisfied: incremental>=16.10.1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from Twisted>=10.0.0->Scrapy)
Requirement already satisfied: constantly>=15.1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from Twisted>=10.0.0->Scrapy)
Requirement already satisfied: zope.interface>=3.6.0 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from Twisted>=10.0.0->Scrapy)
Collecting attrs (from service-identity->Scrapy)
  Using cached attrs-16.3.0-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity->Scrapy)
  Using cached pyasn1_modules-0.0.8-py2.py3-none-any.whl
Collecting pyasn1 (from service-identity->Scrapy)
  Using cached pyasn1-0.1.9-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from zope.interface>=3.6.0->Twisted>=10.0.0->Scrapy)
Installing collected packages: six, w3lib, queuelib, lxml, parsel, PyDispatcher, attrs, pyasn1, pyasn1-modules, service-identity, Scrapy
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/wy/2bhn5gjj3vz2203ty64svcpw0000gn/T/pip-dg_FWG-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

Thank you so much!