ich verfolge this tutorial auf Windows 7 mit Python 3. Allerdings bekomme ich diesen Fehler:raise ValueError ("Expected" + Elementname + "in", Zeile, "at", Zeile [p:]) ValueError: ('Erwartete Versionsangabe in', 'django ~ = 1.9.0', 'at', '~ = 1.9.0')
PS C:\Users\jalal> C:/Python34/python -m pip install django~=1.9.0
Exception:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python34\lib\site-packages\pip\commands\install.py", line 257, in run
InstallRequirement.from_line(name, None))
File "C:\Python34\lib\site-packages\pip\req.py", line 172, in from_line
return cls(req, comes_from, url=url, prereleases=prereleases)
File "C:\Python34\lib\site-packages\pip\req.py", line 70, in __init__
req = pkg_resources.Requirement.parse(req)
File "C:\Python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2667, in parse
reqs = list(parse_requirements(s))
File "C:\Python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2605, in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "C:\Python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2573, in scan_list
raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'django~=1.9.0', 'at', '~=1.9.0')
Storing debug log for failure in C:\Users\jalal\pip\pip.log
PS C:\Users\jalal> pip -v
The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
g of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:4
+ pip <<<< -v
+ CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
ich versuchte es mit -r Flag wie in einer Antwort erwähnte jedoch Stackoverflow habe ich diesen Fehler .
PS C:\Users\jalal> C:/Python34/python -m pip install -r django~=1.9.0
Could not open requirements file: [Errno 2] No such file or directory: 'django~=1.9.0'
Storing debug log for failure in C:\Users\jalal\pip\pip.log
Was ist die Lösung für dieses Problem?
Weitere Informationen:
pip 1.5.6 from C:\Users\jalal\myvenv\lib\site-packages (python 3.4)
(myvenv) PS C:\Users\jalal> pip freeze
(myvenv) PS C:\Users\jalal>
pip freeze
zeigt nichts.
Das ist, was ich ohne -r
Flagge erhalten:
PS C:\Users\jalal> C:/Python34/python -m pip install django~=1.9.0
Exception:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python34\lib\site-packages\pip\commands\install.py", line 257, in run
InstallRequirement.from_line(name, None))
File "C:\Python34\lib\site-packages\pip\req.py", line 172, in from_line
return cls(req, comes_from, url=url, prereleases=prereleases)
File "C:\Python34\lib\site-packages\pip\req.py", line 70, in __init__
req = pkg_resources.Requirement.parse(req)
File "C:\Python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2667, in parse
reqs = list(parse_requirements(s))
File "C:\Python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2605, in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "C:\Python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2573, in scan_list
raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'django~=1.9.0', 'at', '~=1.9.0')
Storing debug log for failure in C:\Users\jalal\pip\pip.log
Ich habe versucht, pip und dann mit dem folgenden Befehl, aber immer noch erhielt Fehler auch die Installation:
PS C:\Users\jalal> myvenv\Scripts\activate
(myvenv) PS C:\Users\jalal> pip install django~=1.9.0
Exception:
Traceback (most recent call last):
File "C:\Users\jalal\myvenv\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Users\jalal\myvenv\lib\site-packages\pip\commands\install.py", line 257, in run
InstallRequirement.from_line(name, None))
File "C:\Users\jalal\myvenv\lib\site-packages\pip\req.py", line 172, in from_line
return cls(req, comes_from, url=url, prereleases=prereleases)
File "C:\Users\jalal\myvenv\lib\site-packages\pip\req.py", line 70, in __init__
req = pkg_resources.Requirement.parse(req)
File "C:\Users\jalal\myvenv\lib\site-packages\pip\_vendor\pkg_resources.py", line 2667, in parse
reqs = list(parse_requirements(s))
File "C:\Users\jalal\myvenv\lib\site-packages\pip\_vendor\pkg_resources.py", line 2605, in parse_requireme
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "C:\Users\jalal\myvenv\lib\site-packages\pip\_vendor\pkg_resources.py", line 2573, in scan_list
raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'django~=1.9.0', 'at', '~=1.9.0')
Storing debug log for failure in C:\Users\jalal\pip\pip.log
(myvenv) PS C:\Users\jalal>
Welche Version von 'pip' verwenden Sie? Vielleicht müssen Sie aktualisieren? 'easy_install -U pip' – jape
pip 1.5.6 von C: \ Benutzer \ jalal \ myvenv \ lib \ site-packages (python 3.4) @jape –
Versuchen Sie' python -m pip installieren -U pip' und dann 'pip install django ~ = 1.9.0' – jape