(python版本 - 3.4.1,Windows 8.1 64位,Microsoft Visual C ++ 10) 我在下面尝试使用pip安装django-toolbelt时出现错误。顺便说一下,我是一名初学者,刚刚开始与django合作。我一直在寻找任何在线解决方案,但没有任何对我有用。我已尝试设置路径并重新安装visual c ++,尽管我无法在tools文件夹中的任何位置找到vsvars64或vsvarsall。
**$ pip install django-toolbelt**
Requirement already satisfied (use --upgrade to upgrade): django-toolbelt in c:
python34\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): django in c:\python34
lib\site-packages (from django-toolbelt)
Downloading/unpacking psycopg2 (from django-toolbelt)
Running setup.py (path:C:\Users\Ekwinder\AppData\Local\Temp\pip_build_Ekwinde
\psycopg2\setup.py) egg_info for package psycopg2
Downloading/unpacking gunicorn (from django-toolbelt)
Downloading/unpacking dj-database-url (from django-toolbelt)
Downloading dj_database_url-0.3.0-py2.py3-none-any.whl
Downloading/unpacking dj-static (from django-toolbelt)
Downloading dj-static-0.0.6.tar.gz
Running setup.py (path:C:\Users\Ekwinder\AppData\Local\Temp\pip_build_Ekwinde
\dj-static\setup.py) egg_info for package dj-static
Downloading/unpacking static3 (from dj-static->django-toolbelt)
Downloading static3-0.5.1.tar.gz
Running setup.py (path:C:\Users\Ekwinder\AppData\Local\Temp\pip_build_Ekwinde
\static3\setup.py) egg_info for package static3
Installing collected packages: psycopg2, gunicorn, dj-database-url, dj-static,
tatic3
Running setup.py install for psycopg2
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
building 'psycopg2._psycopg' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Ekwinder\AppData\Local\Temp\pip_build_Ekwinder\psycopg2\se
up.py", line 581, in <module>
ext_modules=ext)
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools-5.4.1-py3.4.egg\setuptools
command\install.py", line 61, in run
File "C:\Python34\lib\distutils\command\install.py", line 554, in run
self.run_command('build')
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\distutils\command\build_ext.py", line 348, in run
self.build_extensions()
File "C:\Python34\lib\distutils\command\build_ext.py", line 457, in build
extensions
self.build_extension(ext)
File "C:\Users\Ekwinder\AppData\Local\Temp\pip_build_Ekwinder\psycopg2\se
up.py", line 285, in build_extension
build_ext.build_extension(self, extension)
File "C:\Python34\lib\distutils\command\build_ext.py", line 512, in build
extension
depends=ext.depends)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initializ
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in query_vcv
rsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']
Complete output from command C:\Python34\python.exe -c "import setuptools,
okenize;__file__='C:\\Users\\Ekwinder\\AppData\\Local\\Temp\\pip_build_Ekwinder
\psycopg2\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).rea
().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Ekwinde
\AppData\Local\Temp\pip-p1a28xcn-record\install-record.txt --single-version-ext
rnally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
creating build\lib.win-amd64-3.4\psycopg2
copying lib\errorcodes.py -> build\lib.win-amd64-3.4\psycopg2
copying lib\extensions.py -> build\lib.win-amd64-3.4\psycopg2
copying lib\extras.py -> build\lib.win-amd64-3.4\psycopg2
copying lib\pool.py -> build\lib.win-amd64-3.4\psycopg2
copying lib\psycopg1.py -> build\lib.win-amd64-3.4\psycopg2
copying lib\tz.py -> build\lib.win-amd64-3.4\psycopg2
copying lib\_json.py -> build\lib.win-amd64-3.4\psycopg2
copying lib\_range.py -> build\lib.win-amd64-3.4\psycopg2
copying lib\__init__.py -> build\lib.win-amd64-3.4\psycopg2
creating build\lib.win-amd64-3.4\psycopg2\tests
copying tests\dbapi20.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\dbapi20_tpc.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\testconfig.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\testutils.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_async.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_bugX000.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_bug_gc.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_cancel.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_connection.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_copy.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_cursor.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_dates.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_extras_dictcursor.py -> build\lib.win-amd64-3.4\psycopg2\tes
s
copying tests\test_green.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_lobject.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_module.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_notify.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_psycopg2_dbapi20.py -> build\lib.win-amd64-3.4\psycopg2\test
copying tests\test_quote.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_transaction.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_types_basic.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_types_extras.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\test_with.py -> build\lib.win-amd64-3.4\psycopg2\tests
copying tests\__init__.py -> build\lib.win-amd64-3.4\psycopg2\tests
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
running build_ext
building 'psycopg2._psycopg' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Ekwinder\AppData\Local\Temp\pip_build_Ekwinder\psycopg2\setup.
y", line 581, in <module>
ext_modules=ext)
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools-5.4.1-py3.4.egg\setuptools\com
and\install.py", line 61, in run
File "C:\Python34\lib\distutils\command\install.py", line 554, in run
self.run_command('build')
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\distutils\command\build_ext.py", line 348, in run
self.build_extensions()
File "C:\Python34\lib\distutils\command\build_ext.py", line 457, in build_ext
nsions
self.build_extension(ext)
File "C:\Users\Ekwinder\AppData\Local\Temp\pip_build_Ekwinder\psycopg2\setup.
y", line 285, in build_extension
build_ext.build_extension(self, extension)
File "C:\Python34\lib\distutils\command\build_ext.py", line 512, in build_ext
nsion
depends=ext.depends)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsa
l
raise ValueError(str(list(result.keys())))
ValueError: ['path']
----------------------------------------
Cleaning up...
Command C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Us
rs\\Ekwinder\\AppData\\Local\\Temp\\pip_build_Ekwinder\\psycopg2\\setup.py';exe
(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n')
__file__, 'exec'))" install --record C:\Users\Ekwinder\AppData\Local\Temp\pip-
1a28xcn-record\install-record.txt --single-version-externally-managed --compile
failed with error code 1 in C:\Users\Ekwinder\AppData\Local\Temp\pip_build_Ekwi
der\psycopg2
Storing debug log for failure in c:/Users/Ekwinder\pip\pip.log
Ekwinder@STARGATE ~/hellodjango/venv
$ :