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.
Related
I keep trying to update pip with:
pip install --upgrade pip
It seems to complete fine but when I run pip --version its still running the old version (19.0.3 vs 19.3). I'm using pycharm on Windows 10.
I'm trying to install pandas and I've read the issue I'm getting can be solved by updating pip and setuptools.
I saw some suggestions to delete the pip folder. So I went to Python38/Lib/site-packages and found 3 pip folders. pip, pip-19.0.3-py3.8egg. There was a 19.3 folder I deleted already.
If I delete the 19.0.3 folder I get an error running pip commands saying:
File "C:\Users\Jxdwa\AppData\Roaming\Python\Python38\site-packages\pkg_resources\__init__.py", line 583, in _build_master
ws.require(__requires__)
File "C:\Users\Jxdwa\AppData\Roaming\Python\Python38\site-packages\pkg_resources\__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "C:\Users\Jxdwa\AppData\Roaming\Python\Python38\site-packages\pkg_resources\__init__.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (pip 19.3 (c:\users\jxdwa\appdata\roaming\python\python38\site-packages), Requirement.parse('pip==
19.0.3'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python38\Scripts\pip-script.py", line 6, in <module>
from pkg_resources import load_entry_point
File "C:\Users\Jxdwa\AppData\Roaming\Python\Python38\site-packages\pkg_resources\__init__.py", line 3251, in <module>
def _initialize_master_working_set():
File "C:\Users\Jxdwa\AppData\Roaming\Python\Python38\site-packages\pkg_resources\__init__.py", line 3234, in _call_aside
f(*args, **kwargs)
File "C:\Users\Jxdwa\AppData\Roaming\Python\Python38\site-packages\pkg_resources\__init__.py", line 3263, in _initialize_master
_working_set
working_set = WorkingSet._build_master()
File "C:\Users\Jxdwa\AppData\Roaming\Python\Python38\site-packages\pkg_resources\__init__.py", line 585, in _build_master
return cls._build_from_requirements(__requires__)
File "C:\Users\Jxdwa\AppData\Roaming\Python\Python38\site-packages\pkg_resources\__init__.py", line 598, in _build_from_require
ments
dists = ws.resolve(reqs, Environment())
File "C:\Users\Jxdwa\AppData\Roaming\Python\Python38\site-packages\pkg_resources\__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==19.0.3' distribution was not found and is required by the application
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?
I am getting following error while restarting supervisord. I searched for it and tried pip install --upgrade setuptools and easy_install --upgrade pip but nothing is working out.
$ sudo /etc/init.d/supervisord start
Starting supervisord: Traceback (most recent call last):
File "/usr/local/bin/supervisord", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/dist-packages/pkg_resources/__init__.py", line 3020, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python2.6/dist-packages/pkg_resources/__init__.py", line 616, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.6/dist-packages/pkg_resources/__init__.py", line 629, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.6/dist-packages/pkg_resources/__init__.py", line 807, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: supervisor==3.3.1
[FAILED]
I am using Amazon AMI instance. Please help.
I launched a new Amazon EC2 instance with the Amazon Linux AMI and did:
sudo easy_install supervisor
It worked fine.
Based on: http://supervisord.org/installing.html
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)
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