我在筆記本中有一個項目,我想將它複製到我的桌面。我使用Windows 7中的將django項目複製到另一臺PC(postgreSQL)
我安裝了python 3.5(不同版本,說實話,在我的筆記本上是3.4)和postgreSQL。 當然的目錄結構是不同的。在我的筆記本是:
C:/ Python34 /腳本/ myproject1
C:/ Python34 /腳本/ myproject1/myvenv
雖然在我的桌面:
d:/ Python的/ PROGETTI/myproject1
d:/ Python的/ PROGETTI/myproject1/myvenv
所以我在D:/Python/progetti/
複製C:/.../myproject1
,刪除myvenv主任Y,創造了一個新的virtualenv(同名),並試圖安裝從requirements.txt的要求,但它給出了一個錯誤:
Installing collected packages: Django, django-crispy-forms,
django-registration-redux, docutils, Pillow, psycopg2, virtualenv, virtualenv
wrapper-win
Running setup.py install for django-crispy-forms ... done
Running setup.py install for django-registration-redux ... done
Running setup.py install for psycopg2 ... error
Complete output from command d:\python\progetti\possedimenti\myvenv\scripts\
python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\fabio\\AppDat
a\\Local\\Temp\\pip-build-xdv57y50\\psycopg2\\setup.py';exec(compile(getattr(tok
enize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record C:\Users\fabio\AppData\Local\Temp\pip-x4__ikww-record\install-
record.txt --single-version-externally-managed --compile --install-headers d:\py
thon\progetti\possedimenti\myvenv\include\site\python3.5\psycopg2:
running install
running build
running build_py
creating build
creating build\lib.win32-3.5
creating build\lib.win32-3.5\psycopg2
copying lib\errorcodes.py -> build\lib.win32-3.5\psycopg2
copying lib\extensions.py -> build\lib.win32-3.5\psycopg2
copying lib\extras.py -> build\lib.win32-3.5\psycopg2
copying lib\pool.py -> build\lib.win32-3.5\psycopg2
copying lib\psycopg1.py -> build\lib.win32-3.5\psycopg2
copying lib\tz.py -> build\lib.win32-3.5\psycopg2
copying lib\_json.py -> build\lib.win32-3.5\psycopg2
copying lib\_range.py -> build\lib.win32-3.5\psycopg2
copying lib\__init__.py -> build\lib.win32-3.5\psycopg2
creating build\lib.win32-3.5\psycopg2\tests
copying tests\dbapi20.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\dbapi20_tpc.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\testconfig.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\testutils.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_async.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_bugX000.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_bug_gc.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_cancel.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_connection.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_copy.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_cursor.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_dates.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_extras_dictcursor.py -> build\lib.win32-3.5\psycopg2\test
s
copying tests\test_green.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_lobject.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_module.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_notify.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_psycopg2_dbapi20.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_quote.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_transaction.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_types_basic.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_types_extras.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\test_with.py -> build\lib.win32-3.5\psycopg2\tests
copying tests\__init__.py -> build\lib.win32-3.5\psycopg2\tests
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
building 'psycopg2._psycopg' extension
error: Unable to find vcvarsall.bat
----------------------------------------
Command "d:\python\progetti\possedimenti\myvenv\scripts\python.exe -u -c "import
setuptools, tokenize;__file__='C:\\Users\\fabio\\AppData\\Local\\Temp\\pip-buil
d-xdv57y50\\psycopg2\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__f
ile__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Use
rs\fabio\AppData\Local\Temp\pip-x4__ikww-record\install-record.txt --single-vers
ion-externally-managed --compile --install-headers d:\python\progetti\possedimen
ti\myvenv\include\site\python3.5\psycopg2" failed with error code 1 in C:\Users\
fabio\AppData\Local\Temp\pip-build-xdv57y50\psycopg2\
它看起來有一些問題PostgreSQL的,我想。請注意,數據庫尚不存在。
謝謝您的幫助
pyscopg2的安裝過程涉及編譯C擴展。你有那個需要的工具嗎? – spectras
我不知道...我需要什麼工具?也許我可以在我的筆記本上進行控制? – fabio
從名稱'vcvarsall.bat'我猜這是尋找MS Visual C++ – spectras