2016-07-06 10 views
0

私のノートブックにプロジェクトがあり、デスクトップにコピーしたいのですが。私は両方でWindows 7を使用しています別のPCにdjangoプロジェクトをコピーする(postgreSQL)

私はpython 3.5(別のバージョン、正直言って、私のノートブックでは3.4だった)とpostgreSQLをインストールしました。 もちろんのディレクトリ構造は異なります。私のノートブックである:

C:/ Python34 /スクリプト/ myproject1

C:/ Python34 /スクリプト/ myproject1/myvenv

私のデスクトップにある間:

D:/パイソン/ PROGETTI/myproject1

D:/パイソン/ PROGETTI/myproject1/myvenv

だから私はmyvenvディレクターを削除し、D:/Python/progetti/C:/.../myproject1をコピー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といくつかの問題があるに見えますが、私は思います。データベースはまだ存在しないことに注意してください。

+0

pyscopg2のインストールプロセスでは、C拡張をコンパイルする必要があります。それに必要なツールがありますか? – spectras

+0

私は何が必要なツールを知りませんか?たぶん私はノートブックの中でどこかを制御することができますか? – fabio

+1

名前から 'vcvarsall.bat'私はそれがMS Visual C++を探していると思います – spectras

答えて

1

のPython 3.5が現在のpython Postgresのドライバpsycopg2でサポートされていないあなたの助けをありがとう:

The current psycopg2 implementation supports:

  • Python 2 versions from 2.5 to 2.7
  • Python 3 versions from 3.1 to 3.4
  • PostgreSQL versions from 7.4 to 9.4

簡単な回避策は、Python 3.4 virtual environmentを作成し、そこにあなたのプロジェクトを実行することです。

0

私はPython 3.5がMS Visual C++ 2015(look here)を必要とすると思うのでインストールしました。私はそれが17(!)のようなものをインストールしたので良いことではないと思っていますmore MS .NET Framework 16(!)MS SQL Server,4または5以上MS Visual C++Ms web deploy、および他の2-3私のコントロールパネルで=>プログラムと機能。それは約2GBのもので、インストール/ダウンロードには2時間以上かかりました...それは正常ですか?

は、その後、私はそれが動作

... psycopg2 2.6.2(実際のバージョンが)ので、私は他の人をダウングレードすることの代わりに、アップグレードのpython 3.5とPostgreSQL 9.5をサポートしながら、私のrequirements.txtにpsycopg2==2.6.1があったことに気づいた、多分MSビジュアル2015をアンインストールできますか?

関連する問題