简体   繁体   English

错误点安装Monary

[英]Error pip installing monary

I'm trying to install the monary python package using pip. 我正在尝试使用pip安装monary python软件包。 when I run the command 当我运行命令时

pip install monary

This is the full output 这是完整的输出

C:\Users\krist>pip install monary
Collecting monary
  Using cached Monary-0.5.0.tar.gz
Requirement already satisfied: pymongo in c:\users\krist\anaconda3\lib\site-packages (from monary)
Requirement already satisfied: numpy in c:\users\krist\anaconda3\lib\site-packages (from monary)
Building wheels for collected packages: monary
  Running setup.py bdist_wheel for monary ... error
  Complete output from command c:\users\krist\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\krist\\AppData\\Local\\Temp\\pip-build-xkxevy62\\monary\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d 
C:\Users\krist\AppData\Local\Temp\tmp2hws0x_vpip-wheel- --python-tag cp35:
  C:\Users\krist\AppData\Local\Temp\pip-build-xkxevy62\monary\setup.py:90: 
UserWarning: WARNING: the python package pkgconfig is not installed. If you 
have pkg-config installed on your system, please install the python's pkgconfig, e.g. "pip install pkgconfig". Will use libmongoc=C:/Program Files\libmongoc and libbson=C:/Program Files\libbson instead.
% (mongoc_src, bson_src)))
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.5
  creating build\lib.win-amd64-3.5\monary
  copying monary\datehelper.py -> build\lib.win-amd64-3.5\monary
  copying monary\monary.py -> build\lib.win-amd64-3.5\monary
  copying monary\monary_param.py -> build\lib.win-amd64-3.5\monary
  copying monary\ordereddict.py -> build\lib.win-amd64-3.5\monary
  copying monary\write_concern.py -> build\lib.win-amd64-3.5\monary
  copying monary\__init__.py -> build\lib.win-amd64-3.5\monary
  running build_ext
  building 'monary.libcmonary' extension
  creating build\temp.win-amd64-3.5
  creating build\temp.win-amd64-3.5\Release
  creating build\temp.win-amd64-3.5\Release\monary
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:/Program Files\libmongoc\include\libmongoc-1.0" "-IC:/Program Files\libbson\include\libbson-1.0" -Ic:\users\krist\anaconda3\include -Ic:\users\krist\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt" /Tcmonary\cmonary.c /Fobuild\temp.win-amd64-3.5\Release\monary\cmonary.obj -fPIC -O2 -DNDEBUG
  cl : Command line warning D9002 : ignoring unknown option '-fPIC'
  cmonary.c
  monary\cmonary.c(8): fatal error C1083: Cannot open include file: 'mongoc.h': 
No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

  ----------------------------------------
  Failed building wheel for monary
  Running setup.py clean for monary
Failed to build monary
Installing collected packages: monary
  Running setup.py install for monary ... error
    Complete output from command c:\users\krist\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\krist\\AppData\\Local\\Temp\\pip-build-xkxevy62\\monary\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\krist\AppData\Local\Temp\pip-9enpcfz5-record\install-record.txt --single-version-externally-managed --compile:
C:\Users\krist\AppData\Local\Temp\pip-build-xkxevy62\monary\setup.py:90: UserWarning: WARNING: the python package pkgconfig is not installed. If you have pkg-config installed on your system, please install the python's pkgconfig, e.g. "pip install pkgconfig". Will use libmongoc=C:/Program Files\libmongoc and libbson=C:/Program Files\libbson instead.
  % (mongoc_src, bson_src)))
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\monary
copying monary\datehelper.py -> build\lib.win-amd64-3.5\monary
copying monary\monary.py -> build\lib.win-amd64-3.5\monary
copying monary\monary_param.py -> build\lib.win-amd64-3.5\monary
copying monary\ordereddict.py -> build\lib.win-amd64-3.5\monary
copying monary\write_concern.py -> build\lib.win-amd64-3.5\monary
copying monary\__init__.py -> build\lib.win-amd64-3.5\monary
running build_ext
building 'monary.libcmonary' extension
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
creating build\temp.win-amd64-3.5\Release\monary
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:/Program Files\libmongoc\include\libmongoc-1.0" "-IC:/Program Files\libbson\include\libbson-1.0" -Ic:\users\krist\anaconda3\include -Ic:\users\krist\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt" /Tcmonary\cmonary.c /Fobuild\temp.win-amd64-3.5\Release\monary\cmonary.obj -fPIC -O2 -DNDEBUG
cl : Command line warning D9002 : ignoring unknown option '-fPIC'
cmonary.c
monary\cmonary.c(8): fatal error C1083: Cannot open include file: 'mongoc.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

----------------------------------------
Command "c:\users\krist\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\krist\\AppData\\Local\\Temp\\pip-build-xkxevy62\\monary\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\krist\AppData\Local\Temp\pip-9enpcfz5-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\krist\AppData\Local\Temp\pip-build-xkxevy62\monary\

I've tried uninstalling and reinstalling MS Visual Studio but I don't know what failed with exit status 2 means exactly, and I'm not sure how to fix the error in line: 我曾尝试卸载并重新安装MS Visual Studio,但是我不知道failed with exit status 2确切含义是什么,我不确定如何修复该错误:

monary\cmonary.c(8): fatal error C1083: Cannot open include file: 'mongoc.h': No such file or directory

What do I need to do to get this package downloaded? 我需要怎么做才能下载此软件包?

Update: I noticed the warning to install pkgconfig and did that, but the end result is unchanged - still getting the same to errors at the end: 更新:我注意到安装pkgconfig的警告,并且这样做了,但是最终结果没有改变-最终仍然与错误相同:

monary\cmonary.c(8): fatal error C1083: Cannot open include file: 'mongoc.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

----------------------------------------
Command "c:\users\krist\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\krist\\AppData\\Local\\Temp\\pip-build-xkxevy62\\monary\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\krist\AppData\Local\Temp\pip-9enpcfz5-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\krist\AppData\Local\Temp\pip-build-xkxevy62\monary\

https://monary.readthedocs.io/installation.html You can use pip to install monary in platforms other than Windows: https://monary.readthedocs.io/installation.html可以使用pip在Windows以外的平台上安装monary:

$ pip install monary $ pip install monary

Monary uses pkgconfig to find the libmongoc and libbson installations. Monary使用pkgconfig查找libmongoc和libbson安装。 If pkgconfig cannot find the libraries, it will look in the default locations: C:\\Program Files\\libmongoc and C:\\Program Files\\libbson for Windows, and /usr/local for other systems. 如果pkgconfig找不到库,它将在默认位置查找:对于Windows,为C:\\ Program Files \\ libmongoc和C:\\ Program Files \\ libbson,对于其他系统为/ usr / local。 If you cannot use pkgconfig and libmongoc and libbson are not installed in the default directories, you will need to pass the locations to the installation script: 如果无法使用pkgconfig且默认目录中未安装libmongoc和libbson,则需要将这些位置传递给安装脚本:

$ python setup.py install --default-libmongoc C:\\usr --default-libbson C:\\usr If you are installing via pip, and libcmongo and libbson are not installed in the default directories, you must pass --default-libmongoc and --default-libbson to pip using --install-option. $ python setup.py install --default-libmongoc C:\\ usr --default-libbson C:\\ usr如果通过pip安装,并且libcmongo和libbson未安装在默认目录中,则必须传递--default- libmongoc和--default-libbson可以使用--install-option进行涂点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM