Run scrapy under windows 7 - python

I want to create a new scrappy project under win 7. I have installed scrapy over pip and everthing went find.
I am using pip 1.0.1 from c:\python27\lib\site-packages (python 2.7).
I have added the C:\Python27\Scripts as my path variable.
However, when running scrapy in my cmd, I get:
C:\Users\User\EclipseWorkspace>scrapy
Traceback (most recent call last):
File "C:\Python27\Scripts\scrapy-script.py", line 5, in <module>
from pkg_resources import load_entry_point
File "C:\Python27\lib\site-packages\pkg_resources.py", line 2709, in <module>
working_set.require(__requires__)
File "C:\Python27\lib\site-packages\pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "C:\Python27\lib\site-packages\pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: six>=1.5.2
Any recommendation what I am doing wrong?
I appreciate your replies!
Update
When installing pip again I get:
C:\Users\User\EclipseWorkspace>pip --version
pip 6.0.6 from C:\Python27\lib\site-packages\pip-6.0.6-py2.7.egg (python 2.7)
However, when running scrapy:
C:\Users\User\EclipseWorkspace>scrapy
Traceback (most recent call last):
File "C:\Python27\Scripts\scrapy-script.py", line 5, in <module>
from pkg_resources import load_entry_point
File "C:\Python27\lib\site-packages\pkg_resources.py", line 2709, in <module>
working_set.require(__requires__)
File "C:\Python27\lib\site-packages\pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "C:\Python27\lib\site-packages\pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: six>=1.5.2

Related

Python2 - Unable to run pyinstaller

I installed pyinstaller using pip
pip install pyinstaller
but when I run it I get an error
Traceback (most recent call last):
File "/usr/local/bin/pyinstaller", line 7, in <module>
from PyInstaller.__main__ import run
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/__init__.py", line 66, in <module>
__version__ = pkg_resources.get_distribution('PyInstaller').version
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 330, in get_distribution
if isinstance(dist,Requirement): dist = get_provider(dist)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 209, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: PyInstaller
I cannot figure out what the issue is, I have tried reinstalling it. I have googled the error but no results come up that help.
Does anyone know a fix?

error when using scrapy startproject in python2.7

I successfully installed Scrapy under python2.7,and when i created a new project using scrapy startproject example,an exception raised:
Traceback (most recent call last):
File "/usr/local/bin/scrapy", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line 2697, in <module>
working_set.require(__requires__)
File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line 669, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.4/site-packages/pkg_resources.py", line 572, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: six>=1.5.2
any ideas?thanks in advance!

Trouble getting pip to work DistributionNotFound

i recently with Python coding a little programm with a simple GUI (Tkinter).
Now i need PIL to use images.
I want to install PIL using PIP but.
After installing PIP it always gives me this output:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2872, in <module>
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 451, in _build_master
def _build_from_requirements(cls, req_spec):
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 464, in _build_from_requirements
for entry in sys.path:
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 639, in resolve
fallback=True):
pkg_resources.DistributionNotFound: pip==1.5.6
Does anyone know what happend here?
I'm using Elementary OS Freya (Ubuntu 14.04)

Scrapy failing in terminal

Traceback (most recent call last):
File "/usr/local/bin/scrapy", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2793, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 673, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 576, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Scrapy==0.24.4
I have been struggling for hours, I had different errors before, but I deleted all references to python 2.7 in my PATH, (probably a mistake), and now I'm getting new errors.
Help would be greatly appreciated on how to get Scrapy working on my mac.
This error says that the Scrapy Distribution that you are searching for can not be found. Try to upgrade your Scrapy by:
easy_install --upgrade scrapy
or:
pip install --upgrade scrapy

Django - ResolutionError and DistributionError

I had to uninstall my django==1.6.4 and install 1.5 for a project, but now when I install 1.6.4 with pip and try to start a project with django-admin.py startproject PN I get
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/django-admin.py", line 5, in <module>
pkg_resources.run_script('Django==1.6.4', 'django-admin.py')
File "/Library/Python/2.7/site-packages/pkg_resources.py", line 534, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/Library/Python/2.7/site-packages/pkg_resources.py", line 1432, in run_script
raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'django-admin.py'
martinssmacbook:bin martinspasov$ pip install django==1.6.4
I tried installing 1.6.5 but then when I try to start a project i get
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/django-admin.py", line 4, in <module>
import pkg_resources
File "/Library/Python/2.7/site-packages/pkg_resources.py", line 2876, in <module>
working_set = WorkingSet._build_master()
File "/Library/Python/2.7/site-packages/pkg_resources.py", line 451, in _build_master
return cls._build_from_requirements(__requires__)
File "/Library/Python/2.7/site-packages/pkg_resources.py", line 464, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/Library/Python/2.7/site-packages/pkg_resources.py", line 639, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Django==1.6.4
Any ideas onwhat to do ?
this is because you should delete all 1.6.4 files and then install 1.6.5.
but now there are also 1.6.4 files in your Linux / windows.
in windows,
you should delete the files in python/lib/site-packages/django
to uninstall the main Django files.
nd then delete Django-VERSION-py2.7.egg or fix the VERSION in
it. not just these.
you have to delete following 4 files:
django-admin.exe, django-admin.py,django-admin.exe.manifest,django-admin-script.py
then you can reinstall the django.
(In fact, if you know the file, you can try to edit it with change the version.)
in Linux, you can do like that.
if there 's something wrong, you can try to delete all.

Categories