Microsoft Azure Django Python setup error Pillow - python

All sorta new to using Microsoft Azure and needed help deploying a Django App to it. When I push the code from my local repo to Azure it gives me this log.
I noticed it says :
The headers or library files could not be found for zlib, a required
dependency when compiling Pillow from source. Please see the install
instructions at
https://pillow.readthedocs.io/en/latest/installation.html
I did more reading and learnt that Azure cannot install PIL or Pillow from the environment and hence needs to be installed on my system and then uploaded to Azure. I included a file called ".skipPythonDeployment" so that it doesn't erase the environment set on my local system, but then the deployment would fail again.
The important part of the Log generated while Pushing the code to Azure is attached below.
Detected requirements.txt. You can skip Python specific steps with
a .skipPythonDeployment file. Detecting Python runtime from site
configuration Detected python-2.7 Deleting incompatible virtual
environment.
............................................................ Creating
python-2.7 virtual environment.
Downloading/unpacking pillow (from -r requirements.txt (line 4))
.... Running setup.py
(path:D:\home\site\wwwroot\env\build\pillow\setup.py) egg_info for
package pillow
Single threaded build for windows
warning: no files found matching '.sh'
no previously-included directories found matching 'docs_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
warning: no files found matching '.sh'
no previously-included directories found matching 'docs_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution Downloading/unpacking Werkzeug (from -r
requirements.txt (line 5)) Downloading/unpacking flask-cors (from -r
requirements.txt (line 6)) Downloading
Flask_Cors-3.0.2-py2.py3-none-any.whl Downloading/unpacking
Flask>=0.8 (from flask-restful->-r requirements.txt (line 1))
Downloading/unpacking pytz (from flask-restful->-r requirements.txt
(line 1)) Downloading/unpacking six>=1.3.0 (from flask-restful->-r
requirements.txt (line 1)) Downloading
six-1.10.0-py2.py3-none-any.whl Downloading/unpacking aniso8601>=0.82
(from flask-restful->-r requirements.txt (line 1)) Running setup.py
(path:D:\home\site\wwwroot\env\build\aniso8601\setup.py) egg_info for
package aniso8601
Downloading/unpacking olefile (from pillow->-r requirements.txt (line 4)) Running setup.py
(path:D:\home\site\wwwroot\env\build\olefile\setup.py) egg_info for
package olefile
Downloading/unpacking itsdangerous>=0.21 (from Flask>=0.8->flask-restful->-r requirements.txt (line 1)) Running
setup.py (path:D:\home\site\wwwroot\env\build\itsdangerous\setup.py)
egg_info for package itsdangerous
warning: no previously-included files matching '' found under directory 'docs_build' Downloading/unpacking Jinja2>=2.4 (from
Flask>=0.8->flask-restful->-r requirements.txt (line 1))
Downloading/unpacking click>=2.0 (from Flask>=0.8->flask-restful->-r
requirements.txt (line 1)) Downloading/unpacking python-dateutil
(from aniso8601>=0.82->flask-restful->-r requirements.txt (line 1))
Downloading/unpacking MarkupSafe>=0.23 (from
Jinja2>=2.4->Flask>=0.8->flask-restful->-r requirements.txt (line 1))
Downloading MarkupSafe-1.0.tar.gz Running setup.py
(path:D:\home\site\wwwroot\env\build\MarkupSafe\setup.py) egg_info for
package MarkupSafe
Installing collected packages: flask-restful, numpy, pydicom, pillow, Werkzeug, flask-cors, Flask, pytz, six, aniso8601, olefile,
itsdangerous, Jinja2, click, python-dateutil, MarkupSafe
.................. : .................. Running setup.py install
for pydicom .
.. Running setup.py install for pillow
Single threaded build for windows
warning: no files found matching '.sh'
no previously-included directories found matching 'docs_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\home\site\wwwroot\env\build\pillow\setup.py", line 756, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Complete output from command D:\home\site\wwwroot\env\Scripts\python.exe -c "import setuptools,
tokenize;file='D:\home\site\wwwroot\env\build\pillow\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
d:\local\temp\pip-nu1mtm-record\install-record.txt
--single-version-externally-managed --compile --install-headers D:\home\site\wwwroot\env\include\site\python2.7:
Single threaded build for windows running install running build running build_py creating build creating
build\lib.win32-2.7 creating build\lib.win32-2.7\PIL copying
PIL\BdfFontFile.py -> build\lib.win32-2.7\PIL copying
PIL\BmpImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\BufrStubImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\ContainerIO.py -> build\lib.win32-2.7\PIL copying
PIL\CurImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\DcxImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\DdsImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\EpsImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\ExifTags.py -> build\lib.win32-2.7\PIL copying PIL\features.py
-> build\lib.win32-2.7\PIL copying PIL\FitsStubImagePlugin.py -> build\lib.win32-2.7\PIL copying PIL\FliImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\FontFile.py ->
build\lib.win32-2.7\PIL copying PIL\FpxImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\FtexImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\GbrImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\GdImageFile.py ->
build\lib.win32-2.7\PIL copying PIL\GifImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\GimpGradientFile.py ->
build\lib.win32-2.7\PIL copying PIL\GimpPaletteFile.py ->
build\lib.win32-2.7\PIL copying PIL\GribStubImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\Hdf5StubImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\IcnsImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\IcoImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\Image.py ->
build\lib.win32-2.7\PIL copying PIL\ImageChops.py ->
build\lib.win32-2.7\PIL copying PIL\ImageCms.py ->
build\lib.win32-2.7\PIL copying PIL\ImageColor.py ->
build\lib.win32-2.7\PIL copying PIL\ImageDraw.py ->
build\lib.win32-2.7\PIL copying PIL\ImageDraw2.py ->
build\lib.win32-2.7\PIL copying PIL\ImageEnhance.py ->
build\lib.win32-2.7\PIL copying PIL\ImageFile.py ->
build\lib.win32-2.7\PIL copying PIL\ImageFilter.py ->
build\lib.win32-2.7\PIL copying PIL\ImageFont.py ->
build\lib.win32-2.7\PIL copying PIL\ImageGrab.py ->
build\lib.win32-2.7\PIL copying PIL\ImageMath.py ->
build\lib.win32-2.7\PIL copying PIL\ImageMode.py ->
build\lib.win32-2.7\PIL copying PIL\ImageMorph.py ->
build\lib.win32-2.7\PIL copying PIL\ImageOps.py ->
build\lib.win32-2.7\PIL copying PIL\ImagePalette.py ->
build\lib.win32-2.7\PIL copying PIL\ImagePath.py ->
build\lib.win32-2.7\PIL copying PIL\ImageQt.py ->
build\lib.win32-2.7\PIL copying PIL\ImageSequence.py ->
build\lib.win32-2.7\PIL copying PIL\ImageShow.py ->
build\lib.win32-2.7\PIL copying PIL\ImageStat.py ->
build\lib.win32-2.7\PIL copying PIL\ImageTk.py ->
build\lib.win32-2.7\PIL copying PIL\ImageTransform.py ->
build\lib.win32-2.7\PIL copying PIL\ImageWin.py ->
build\lib.win32-2.7\PIL copying PIL\ImImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\ImtImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\IptcImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\Jpeg2KImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\JpegImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\JpegPresets.py ->
build\lib.win32-2.7\PIL copying PIL\McIdasImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\MicImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\MpegImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\MpoImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\MspImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\OleFileIO.py ->
build\lib.win32-2.7\PIL copying PIL\PaletteFile.py ->
build\lib.win32-2.7\PIL copying PIL\PalmImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PcdImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PcfFontFile.py ->
build\lib.win32-2.7\PIL copying PIL\PcxImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PdfImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PixarImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PngImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PpmImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PsdImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PSDraw.py ->
build\lib.win32-2.7\PIL copying PIL\PyAccess.py ->
build\lib.win32-2.7\PIL copying PIL\SgiImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\SpiderImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\SunImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\TarIO.py ->
build\lib.win32-2.7\PIL copying PIL\TgaImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\TiffImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\TiffTags.py ->
build\lib.win32-2.7\PIL copying PIL\WalImageFile.py ->
build\lib.win32-2.7\PIL copying PIL\WebPImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\WmfImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\XbmImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\XpmImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\XVThumbImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL_binary.py ->
build\lib.win32-2.7\PIL copying PIL_tkinter_finder.py ->
build\lib.win32-2.7\PIL copying PIL_util.py ->
build\lib.win32-2.7\PIL copying PIL__init__.py ->
build\lib.win32-2.7\PIL running egg_info writing requirements to
Pillow.egg-info\requires.txt writing Pillow.egg-info\PKG-INFO
writing top-level names to Pillow.egg-info\top_level.txt writing
dependency_links to Pillow.egg-info\dependency_links.txt warning:
manifest_maker: standard file '-c' not found
reading manifest file 'Pillow.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching
'.sh' no previously-included directories found matching
'docs_static' warning: no previously-included files found matching
'.coveragerc' warning: no previously-included files found matching
'.editorconfig' warning: no previously-included files found
matching '.landscape.yaml' warning: no previously-included files
found matching '.travis' warning: no previously-included files
found matching '.travis*' warning: no previously-included files
found matching 'appveyor.yml' warning: no previously-included files
found matching 'build_children.sh' warning: no previously-included
files found matching 'tox.ini' warning: no previously-included
files matching '.git' found anywhere in distribution warning: no
previously-included files matching '.pyc' found anywhere in
distribution warning: no previously-included files matching '.so'
found anywhere in distribution writing manifest file
'Pillow.egg-info\SOURCES.txt' running build_ext
The headers or library files could not be found for zlib, a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\home\site\wwwroot\env\build\pillow\setup.py", line 756, in <module>
raise RequiredDependencyException(msg) __main__.RequiredDependencyException:
The headers or library files could not be found for zlib, a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
---------------------------------------- Cleaning up... .................................................... Command
D:\home\site\wwwroot\env\Scripts\python.exe -c "import setuptools,
tokenize;file='D:\home\site\wwwroot\env\build\pillow\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
d:\local\temp\pip-nu1mtm-record\install-record.txt
--single-version-externally-managed --compile --install-headers D:\home\site\wwwroot\env\include\site\python2.7 failed with error code
1 in D:\home\site\wwwroot\env\build\pillow Storing debug log for
failure in D:\home\pip\pip.log An error has occurred during web site
deployment. Error - Changes committed to remote repository but
deployment to website failed.
Thank you

It seems that you were using Azure Web Apps/App Services for deploying your Django App which contains the Pillow package, and the Pillow package seems that you declared in the requirements.txt like Pillow>=2.0.0.
However, unfortunately, there are two issues for using the Pillow package on Azure App Services.
Pillow includes C code which need to be compiled when deploying your app into Azure. The solution is that you need to build a wheel file of Pillow to add it to your project and declare the wheel file in the requirements.txt, please refer to the section Troubleshooting - Package Installation of Azure offical tutorial for Django to know it.
Pillow as an image library for Python required GDI API & resources. On Azure App Services, any GDI calls are restricted and blocked, please see here to know.
So the only way for deploying your Django App is using Azure VM.

Your pip is too old to download the whl (known issues with default version of Python). Please update your Python installation or update pip directly:
https://blogs.msdn.microsoft.com/pythonengineering/2016/08/04/upgrading-python-on-azure-app-service/

Related

Hello! I have been trying to install pyAudio for some time now but i keep getting errors [duplicate]

so I recently upgraded to Python 3.9 and when trying to install some libraries - specifically pip install discord - I encountered the following error:
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' 'c:\users\user\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmprrfx0262'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-qj3xz8wb\multidict
Complete output (40 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\multidict
copying multidict\_abc.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_compat.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_base.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_py.py -> build\lib.win-amd64-3.9\multidict
copying multidict\__init__.py -> build\lib.win-amd64-3.9\multidict
running egg_info
writing multidict.egg-info\PKG-INFO
writing dependency_links to multidict.egg-info\dependency_links.txt
writing top-level names to multidict.egg-info\top_level.txt
reading manifest file 'multidict.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'multidict\_multidict.html'
warning: no previously-included files found matching 'multidict\*.so'
warning: no previously-included files found matching 'multidict\*.pyd'
warning: no previously-included files found matching 'multidict\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'multidict.egg-info\SOURCES.txt'
copying multidict\__init__.pyi -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict.c -> build\lib.win-amd64-3.9\multidict
copying multidict\py.typed -> build\lib.win-amd64-3.9\multidict
creating build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\defs.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\dict.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\istr.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\iter.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\pair_list.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\views.h -> build\lib.win-amd64-3.9\multidict\_multilib
running build_ext
building 'multidict._multidict' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for multidict
Building wheel for yarl (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python39\python.exe' 'c:\users\user\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmp_na_hzow'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-qj3xz8wb\yarl
Complete output (35 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\yarl
copying yarl\_quoting.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_py.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_url.py -> build\lib.win-amd64-3.9\yarl
copying yarl\__init__.py -> build\lib.win-amd64-3.9\yarl
running egg_info
writing yarl.egg-info\PKG-INFO
writing dependency_links to yarl.egg-info\dependency_links.txt
writing requirements to yarl.egg-info\requires.txt
writing top-level names to yarl.egg-info\top_level.txt
reading manifest file 'yarl.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl\*.html'
warning: no previously-included files found matching 'yarl\*.so'
warning: no previously-included files found matching 'yarl\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'yarl.egg-info\SOURCES.txt'
copying yarl\__init__.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.c -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyx -> build\lib.win-amd64-3.9\yarl
copying yarl\py.typed -> build\lib.win-amd64-3.9\yarl
running build_ext
building 'yarl._quoting_c' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for yarl
Failed to build multidict yarl
ERROR: Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly
Obviously I went to the link and downloaded the build tools and then checked the C++ part but after restarting my computer, re-installing visual studio, I am still encountering the same problem. I am wondering if there is a part in the installation process that I am missing out on or if I have messed something up.
Any help appreciated.
Open up visual studio installer and select modify build tools
Go to individual components and make sure C++ 2019 Redistributable Update, C++ CMake tools for Windows, MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.27), C++ AddressSanitizer (Experimental), C++ Build Tools core features, are checked.
If not check them and select modify. If you are on an ARM or ARM64 based system, replace MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.27) with the ARM or ARM64 version.
Try to install Visual Studio: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16, and Visual Studio C++ Build Tools: https://visualstudio.microsoft.com/visual-cpp-build-tools/. The problem should be fixed.
Make sure you have version 14+.
I think for installing discord api you need to write the command pip install discord.py and not pip install discord

error: Microsoft Visual C++ 14.0 or greater is required

When doing pip install discord.py, I got the error message "_error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/_"
I have installed the build tools and Visual Studio (I normally use VSCode), but it still gives me this error message, and when running my code it says ModuleNotFoundError: module discord was not found.
Full error log:
ERROR: Command errored out with exit status 1:
command: 'd:\programmerspil\python h\python.exe' 'd:\programmerspil\python h\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\villa\AppData\Local\Temp\tmpygt2fewg'
cwd: C:\Users\villa\AppData\Local\Temp\pip-install-jo0r1bad\multidict
Complete output (40 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\multidict
copying multidict\_abc.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_compat.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_base.py -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict_py.py -> build\lib.win-amd64-3.9\multidict
copying multidict\__init__.py -> build\lib.win-amd64-3.9\multidict
running egg_info
writing multidict.egg-info\PKG-INFO
writing dependency_links to multidict.egg-info\dependency_links.txt
writing top-level names to multidict.egg-info\top_level.txt
reading manifest file 'multidict.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'multidict\_multidict.html'
warning: no previously-included files found matching 'multidict\*.so'
warning: no previously-included files found matching 'multidict\*.pyd'
warning: no previously-included files found matching 'multidict\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'multidict.egg-info\SOURCES.txt'
copying multidict\__init__.pyi -> build\lib.win-amd64-3.9\multidict
copying multidict\_multidict.c -> build\lib.win-amd64-3.9\multidict
copying multidict\py.typed -> build\lib.win-amd64-3.9\multidict
creating build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\defs.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\dict.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\istr.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\iter.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\pair_list.h -> build\lib.win-amd64-3.9\multidict\_multilib
copying multidict\_multilib\views.h -> build\lib.win-amd64-3.9\multidict\_multilib
running build_ext
building 'multidict._multidict' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for multidict
Building wheel for yarl (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'd:\programmerspil\python h\python.exe' 'd:\programmerspil\python h\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\villa\AppData\Local\Temp\tmp3uspc3_h'
cwd: C:\Users\villa\AppData\Local\Temp\pip-install-jo0r1bad\yarl
Complete output (35 lines):
**********************
* Accellerated build *
**********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\yarl
copying yarl\_quoting.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_py.py -> build\lib.win-amd64-3.9\yarl
copying yarl\_url.py -> build\lib.win-amd64-3.9\yarl
copying yarl\__init__.py -> build\lib.win-amd64-3.9\yarl
running egg_info
writing yarl.egg-info\PKG-INFO
writing dependency_links to yarl.egg-info\dependency_links.txt
writing requirements to yarl.egg-info\requires.txt
writing top-level names to yarl.egg-info\top_level.txt
reading manifest file 'yarl.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl\*.html'
warning: no previously-included files found matching 'yarl\*.so'
warning: no previously-included files found matching 'yarl\*.pyd'
no previously-included directories found matching 'docs\_build'
writing manifest file 'yarl.egg-info\SOURCES.txt'
copying yarl\__init__.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.c -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyi -> build\lib.win-amd64-3.9\yarl
copying yarl\_quoting_c.pyx -> build\lib.win-amd64-3.9\yarl
copying yarl\py.typed -> build\lib.win-amd64-3.9\yarl
running build_ext
building 'yarl._quoting_c' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for yarl
Failed to build multidict yarl
ERROR: Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly

Error while installing Django-channels on Python 3.5 on Windows

I'm also getting the same error while installing Twisted.
Here's version info:
Django : 1.9
Python : 3.5
Trying to install latest version of Django-channels
Command used : pip install channels
The error :
running build_ext
building 'twisted.test.raiser' extension error:
[WinError 2] The system cannot find the file specified
(Almost) full error message
.......pip install channels
Collecting channels
Using cached channels-1.1.8-py2.py3-none-any.whl
Collecting daphne~=1.3 (from channels)
Using cached daphne-1.3.0-py2.py3-none-any.whl
Requirement already satisfied: asgiref~=1.1 in g:\django\projectChat\venv\lib\site-packages (from channels
)
Requirement already satisfied: Django>=1.8 in g:\django\projectChat\venv\lib\site-packages (from channels)
Requirement already satisfied: autobahn>=0.18 in g:\django\projectChat\venv\lib\site-packages (from daphne
~=1.3->channels)
Collecting twisted>=17.1 (from daphne~=1.3->channels)
Using cached Twisted-17.9.0.tar.bz2
Requirement already satisfied: six in g:\django\projectChat\venv\lib\site-packages (from asgiref~=1.1->cha
nnels)
Requirement already satisfied: txaio>=2.7.0 in g:\django\projectChat\venv\lib\site-packages (from autobahn
>=0.18->daphne~=1.3->channels)
Requirement already satisfied: zope.interface>=4.0.2 in g:\django\projectChat\venv\lib\site-packages (from
twisted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: constantly>=15.1 in g:\django\projectChat\venv\lib\site-packages (from twis
ted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: incremental>=16.10.1 in g:\django\projectChat\venv\lib\site-packages (from
twisted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: Automat>=0.3.0 in g:\django\projectChat\venv\lib\site-packages (from twiste
d>=17.1->daphne~=1.3->channels)
Requirement already satisfied: hyperlink>=17.1.1 in g:\django\projectChat\venv\lib\site-packages (from twi
sted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: setuptools in g:\django\projectChat\venv\lib\site-packages (from zope.inter
face>=4.0.2->twisted>=17.1->daphne~=1.3->channels)
Requirement already satisfied: attrs in g:\django\projectChat\venv\lib\site-packages (from Automat>=0.3.0-
>twisted>=17.1->daphne~=1.3->channels)
Installing collected packages: twisted, daphne, channels
Running setup.py install for twisted ... error
Complete output from command G:\django\projectChat\venv\Scripts\python.exe -u -c "import setuptools, t
okenize;__file__='C:\\Users\\Mike\\AppData\\Local\\Temp\\pip-build-ngnwgsvg\\twisted\\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:\Use
rs\Mike\AppData\Local\Temp\pip-y5sbi03u-record\install-record.txt --single-version-externally-managed --compile --install-
headers G:\django\projectChat\venv\include\site\python3.5\twisted:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\twisted
copying src\twisted\copyright.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\plugin.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\_version.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\__init__.py -> build\lib.win-amd64-3.5\twisted
copying src\twisted\__main__.py -> build\lib.win-amd64-3.5\twisted
creating build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\app.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\internet.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\reactors.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\service.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\strports.py -> build\lib.win-amd64-3.5\twisted\application
copying src\twisted\application\__init__.py -> build\lib.win-amd64-3.5\twisted\application
creating build\lib.win-amd64-3.5\twisted\conch
copying src\twisted\conch\avatar.py -> build\lib.win-amd64-3.5\twisted\conch
[...]
creating build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_convenience.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_memory.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_team.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\test_threadworker.py -> build\lib.win-amd64-3.5\twisted\_threads\test
copying src\twisted\_threads\test\__init__.py -> build\lib.win-amd64-3.5\twisted\_threads\test
running egg_info
writing dependency_links to src\Twisted.egg-info\dependency_links.txt
writing entry points to src\Twisted.egg-info\entry_points.txt
writing src\Twisted.egg-info\PKG-INFO
writing top-level names to src\Twisted.egg-info\top_level.txt
writing requirements to src\Twisted.egg-info\requires.txt
reading manifest file 'src\Twisted.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.misc' found under directory 'src\twisted'
warning: no previously-included files matching '*.bugfix' found under directory 'src\twisted'
warning: no previously-included files matching '*.doc' found under directory 'src\twisted'
warning: no previously-included files matching '*.feature' found under directory 'src\twisted'
warning: no previously-included files matching '*.removal' found under directory 'src\twisted'
warning: no previously-included files matching 'NEWS' found under directory 'src\twisted'
warning: no previously-included files matching 'README' found under directory 'src\twisted'
warning: no previously-included files matching 'newsfragments' found under directory 'src\twisted'
warning: no previously-included files found matching 'src\twisted\topfiles\CREDITS'
warning: no previously-included files found matching 'src\twisted\topfiles\ChangeLog.Old'
warning: no previously-included files found matching 'pyproject.toml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching 'appveyor.yml'
no previously-included directories found matching 'bin'
no previously-included directories found matching 'admin'
no previously-included directories found matching '.travis'
warning: no previously-included files found matching 'docs\historic\2003'
warning: no previously-included files matching '*' found under directory 'docs\historic\2003'
writing manifest file 'src\Twisted.egg-info\SOURCES.txt'
copying src\twisted\python\_sendmsg.c -> build\lib.win-amd64-3.5\twisted\python
copying src\twisted\python\twisted-completion.zsh -> build\lib.win-amd64-3.5\twisted\python
creating build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\python\_pydoctortemplates\common.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\python\_pydoctortemplates\index.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\python\_pydoctortemplates\summary.html -> build\lib.win-amd64-3.5\twisted\python\_pydoctortemplates
copying src\twisted\test\cert.pem.no_trailing_newline -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\key.pem.no_trailing_newline -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\raiser.c -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\raiser.pyx -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\test\server.pem -> build\lib.win-amd64-3.5\twisted\test
copying src\twisted\internet\iocpreactor\build.bat -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
copying src\twisted\internet\iocpreactor\notes.txt -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
creating build\lib.win-amd64-3.5\twisted\internet\iocpreactor\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\acceptex.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\
iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\connectex.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\iocpsupport.c -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor
\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\iocpsupport.pyx -> build\lib.win-amd64-3.5\twisted\internet\iocpreact
or\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\winsock_pointers.c -> build\lib.win-amd64-3.5\twisted\internet\iocpre
actor\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\winsock_pointers.h -> build\lib.win-amd64-3.5\twisted\internet\iocpre
actor\iocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\wsarecv.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\i
ocpsupport
copying src\twisted\internet\iocpreactor\iocpsupport\wsasend.pxi -> build\lib.win-amd64-3.5\twisted\internet\iocpreactor\i
ocpsupport
copying src\twisted\internet\test\_awaittests.py.3only -> build\lib.win-amd64-3.5\twisted\internet\test
copying src\twisted\internet\test\_yieldfromtests.py.3only -> build\lib.win-amd64-3.5\twisted\internet\test
creating build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\chain.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\not-a-certificate -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\thing1.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\thing2-duplicate.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\internet\test\fake_CAs\thing2.pem -> build\lib.win-amd64-3.5\twisted\internet\test\fake_CAs
copying src\twisted\mail\test\rfc822.message -> build\lib.win-amd64-3.5\twisted\mail\test
copying src\twisted\python\test\_deprecatetests.py.3only -> build\lib.win-amd64-3.5\twisted\python\test
copying src\twisted\words\im\instancemessenger.glade -> build\lib.win-amd64-3.5\twisted\words\im
copying src\twisted\words\xish\xpathparser.g -> build\lib.win-amd64-3.5\twisted\words\xish
running build_ext
building 'twisted.test.raiser' extension
error: [WinError 2] The system cannot find the file specified
----------------------------------------
Command "G:\django\projectChat\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Us
ers\\Mike\\AppData\\Local\\Temp\\pip-build-ngnwgsvg\\twisted\\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\Mike\AppData\Loca
l\Temp\pip-y5sbi03u-record\install-record.txt --single-version-externally-managed --compile --install-headers G:\django\projectChat\venv\include\site\python3.5\twisted" failed with error code 1 in C:\Users\Mike\AppData\Local\Tem
p\pip-build-ngnwgsvg\twisted\
I don't know what i'm missing, could someone help me please, thanks.
You need a working C compiler to install Twisted on platforms for which wheels are not provided. There is no Python 3.5 wheel on PyPI for Twisted (at this time). So you need a working C compiler.
Follow these instructions for installing VS2015 to get a working C compiler so Twisted can build the necessary extension modules and install successfully.
The problem is not regarding the need for Visual C++ 14.0 or whatsoever. It is concerned with the installation of Twisted. I was able to fix this problem after trying for weeks together.
To install the correct version of Twisted visit this link. (Found this on a similar question's answer, I'm not sure of the writer to give rightful credits).
The above-mentioned link displays several versions of Twisted. You should download the one corresponding to your python version. For instance, if your python version is 3.5, you should proceed with downloading cp35m-win32.whl (For Windows only) and so forth.
Further, open Command prompt, go to the downloaded path activate your virtual environment and pip install the downloaded file.
This shall fix your issue.
I had a similar problem... I was only able to fix it by downloading Visual Studio Build tools and installing the Visual C++ Build Tools, Windows 10 SDK, and VC++ 2015.3 v14
Microsoft Visual C++ is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

Can't install mongoengine inside virtualenv

When I try to install mongoengine in virtualenv, I've got problem:
Requirement already satisfied (use --upgrade to upgrade): flask-mongoengine in ./lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): Flask>=0.8 in ./lib/python2.7/site-packages (from flask-mongoengine)
Downloading/unpacking mongoengine>=0.7.10 (from flask-mongoengine)
Running setup.py (path:/var/www/msgapp/backend/build/mongoengine/setup.py) egg_info for package mongoengine
0.8.7
no previously-included directories found matching 'docs/_build'
Downloading/unpacking flask-wtf (from flask-mongoengine)
Running setup.py (path:/var/www/msgapp/backend/build/flask-wtf/setup.py) egg_info for package flask-wtf
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'docs/_themes/.git'
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in ./lib/python2.7/site-packages (from Flask>=0.8->flask-mongoengine)
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in ./lib/python2.7/site-packages (from Flask>=0.8->flask-mongoengine)
Requirement already satisfied (use --upgrade to upgrade): itsdangerous>=0.21 in ./lib/python2.7/site-packages (from Flask>=0.8->flask-mongoengine)
Requirement already satisfied (use --upgrade to upgrade): pymongo>=2.5 in ./lib/python2.7/site-packages (from mongoengine>=0.7.10->flask-mongoengine)
Requirement already satisfied (use --upgrade to upgrade): WTForms>=1.0.5,<2.0 in ./lib/python2.7/site-packages (from flask-wtf->flask-mongoengine)
Requirement already satisfied (use --upgrade to upgrade): markupsafe in ./lib/python2.7/site-packages (from Jinja2>=2.4->Flask>=0.8->flask-mongoengine)
Installing collected packages: mongoengine, flask-wtf
Running setup.py install for mongoengine
0.8.7
no previously-included directories found matching 'docs/_build'
error: could not delete '/var/www/msgapp/backend/lib/python2.7/site-packages/bson/json_util.py': Permission denied
Complete output from command /var/www/msgapp/backend/bin/python2.7 -c "import setuptools, tokenize;__file__='/var/www/msgapp/backend/build/mongoengine/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-811vit-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/msgapp/backend/include/site/python2.7:
0.8.7
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/mongoengine
copying mongoengine/common.py -> build/lib.linux-x86_64-2.7/mongoengine
copying mongoengine/document.py -> build/lib.linux-x86_64-2.7/mongoengine
copying mongoengine/context_managers.py -> build/lib.linux-x86_64-2.7/mongoengine
copying mongoengine/__init__.py -> build/lib.linux-x86_64-2.7/mongoengine
copying mongoengine/connection.py -> build/lib.linux-x86_64-2.7/mongoengine
copying mongoengine/errors.py -> build/lib.linux-x86_64-2.7/mongoengine
copying mongoengine/dereference.py -> build/lib.linux-x86_64-2.7/mongoengine
copying mongoengine/python_support.py -> build/lib.linux-x86_64-2.7/mongoengine
copying mongoengine/signals.py -> build/lib.linux-x86_64-2.7/mongoengine
copying mongoengine/fields.py -> build/lib.linux-x86_64-2.7/mongoengine
creating build/lib.linux-x86_64-2.7/bson
copying bson/json_util.py -> build/lib.linux-x86_64-2.7/bson
copying bson/objectid.py -> build/lib.linux-x86_64-2.7/bson
copying bson/py3compat.py -> build/lib.linux-x86_64-2.7/bson
copying bson/tz_util.py -> build/lib.linux-x86_64-2.7/bson
copying bson/max_key.py -> build/lib.linux-x86_64-2.7/bson
copying bson/binary.py -> build/lib.linux-x86_64-2.7/bson
copying bson/__init__.py -> build/lib.linux-x86_64-2.7/bson
copying bson/code.py -> build/lib.linux-x86_64-2.7/bson
copying bson/son.py -> build/lib.linux-x86_64-2.7/bson
copying bson/errors.py -> build/lib.linux-x86_64-2.7/bson
copying bson/timestamp.py -> build/lib.linux-x86_64-2.7/bson
copying bson/regex.py -> build/lib.linux-x86_64-2.7/bson
copying bson/dbref.py -> build/lib.linux-x86_64-2.7/bson
copying bson/min_key.py -> build/lib.linux-x86_64-2.7/bson
creating build/lib.linux-x86_64-2.7/mongoengine/base
copying mongoengine/base/metaclasses.py -> build/lib.linux-x86_64-2.7/mongoengine/base
copying mongoengine/base/common.py -> build/lib.linux-x86_64-2.7/mongoengine/base
copying mongoengine/base/document.py -> build/lib.linux-x86_64-2.7/mongoengine/base
copying mongoengine/base/__init__.py -> build/lib.linux-x86_64-2.7/mongoengine/base
copying mongoengine/base/datastructures.py -> build/lib.linux-x86_64-2.7/mongoengine/base
copying mongoengine/base/fields.py -> build/lib.linux-x86_64-2.7/mongoengine/base
creating build/lib.linux-x86_64-2.7/mongoengine/django
copying mongoengine/django/shortcuts.py -> build/lib.linux-x86_64-2.7/mongoengine/django
copying mongoengine/django/sessions.py -> build/lib.linux-x86_64-2.7/mongoengine/django
copying mongoengine/django/tests.py -> build/lib.linux-x86_64-2.7/mongoengine/django
copying mongoengine/django/storage.py -> build/lib.linux-x86_64-2.7/mongoengine/django
copying mongoengine/django/__init__.py -> build/lib.linux-x86_64-2.7/mongoengine/django
copying mongoengine/django/auth.py -> build/lib.linux-x86_64-2.7/mongoengine/django
copying mongoengine/django/utils.py -> build/lib.linux-x86_64-2.7/mongoengine/django
creating build/lib.linux-x86_64-2.7/mongoengine/queryset
copying mongoengine/queryset/queryset.py -> build/lib.linux-x86_64-2.7/mongoengine/queryset
copying mongoengine/queryset/base.py -> build/lib.linux-x86_64-2.7/mongoengine/queryset
copying mongoengine/queryset/visitor.py -> build/lib.linux-x86_64-2.7/mongoengine/querset
copying mongoengine/queryset/__init__.py -> build/lib.linux-x86_64-2.7/mongoengine/queryset
copying mongoengine/queryset/field_list.py -> build/lib.linux-x86_64-2.7/mongoengine/queryset
copying mongoengine/queryset/transform.py -> build/lib.linux-x86_64-2.7/mongoengine/queryset
copying mongoengine/queryset/manager.py -> build/lib.linux-x86_64-2.7/mongoengine/queryset
creating build/lib.linux-x86_64-2.7/mongoengine/django/mongo_auth
copying mongoengine/django/mongo_auth/__init__.py -> build/lib.linux-x86_64-2.7/mongoengine/django/mongo_auth
copying mongoengine/django/mongo_auth/models.py -> build/lib.linux-x86_64-2.7/mongoengine/django/mongo_auth
running egg_info
writing requirements to mongoengine.egg-info/requires.txt
writing mongoengine.egg-info/PKG-INFO
writing top-level names to mongoengine.egg-info/top_level.txt
writing dependency_links to mongoengine.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'mongoengine.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
writing manifest file 'mongoengine.egg-info/SOURCES.txt'
running install_lib
copying build/lib.linux-x86_64-2.7/mongoengine/base/metaclasses.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/base
copying build/lib.linux-x86_64-2.7/mongoengine/base/common.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/base
copying build/lib.linux-x86_64-2.7/mongoengine/base/document.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/base
copying build/lib.linux-x86_64-2.7/mongoengine/base/__init__.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/base
copying build/lib.linux-x86_64-2.7/mongoengine/base/datastructures.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/base
copying build/lib.linux-x86_64-2.7/mongoengine/base/fields.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/base
copying build/lib.linux-x86_64-2.7/mongoengine/django/mongo_auth/__init__.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/django/mongo_auth
copying build/lib.linux-x86_64-2.7/mongoengine/django/mongo_auth/models.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/django/mongo_auth
copying build/lib.linux-x86_64-2.7/mongoengine/django/shortcuts.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/django
copying build/lib.linux-x86_64-2.7/mongoengine/django/sessions.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/django
copying build/lib.linux-x86_64-2.7/mongoengine/django/tests.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/django
copying build/lib.linux-x86_64-2.7/mongoengine/django/storage.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/django
copying build/lib.linux-x86_64-2.7/mongoengine/django/__init__.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/django
copying build/lib.linux-x86_64-2.7/mongoengine/django/auth.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/django
copying build/lib.linux-x86_64-2.7/mongoengine/django/utils.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/django
copying build/lib.linux-x86_64-2.7/mongoengine/common.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine
copying build/lib.linux-x86_64-2.7/mongoengine/document.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine
copying build/lib.linux-x86_64-2.7/mongoengine/queryset/queryset.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/queryset
copying build/lib.linux-x86_64-2.7/mongoengine/queryset/base.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/queryset
copying build/lib.linux-x86_64-2.7/mongoengine/queryset/visitor.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/queryset
copying build/lib.linux-x86_64-2.7/mongoengine/queryset/__init__.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/queryset
copying build/lib.linux-x86_64-2.7/mongoengine/queryset/field_list.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/queryset
copying build/lib.linux-x86_64-2.7/mongoengine/queryset/transform.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/queryset
copying build/lib.linux-x86_64-2.7/mongoengine/queryset/manager.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine/queryset
copying build/lib.linux-x86_64-2.7/mongoengine/context_managers.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine
copying build/lib.linux-x86_64-2.7/mongoengine/__init__.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine
copying build/lib.linux-x86_64-2.7/mongoengine/connection.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine
copying build/lib.linux-x86_64-2.7/mongoengine/errors.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine
copying build/lib.linux-x86_64-2.7/mongoengine/dereference.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine
copying build/lib.linux-x86_64-2.7/mongoengine/python_support.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine
copying build/lib.linux-x86_64-2.7/mongoengine/signals.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine
copying build/lib.linux-x86_64-2.7/mongoengine/fields.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/mongoengine
copying build/lib.linux-x86_64-2.7/bson/json_util.py -> /var/www/msgapp/backend/lib/python2.7/site-packages/bson
error: could not delete '/var/www/msgapp/backend/lib/python2.7/site-packages/bson/json_util.py': Permission denied
----------------------------------------
Cleaning up...
Command /var/www/msgapp/backend/bin/python2.7 -c "import setuptools, tokenize;__file__='/var/www/msgapp/backend/build/mongoengine/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-811vit-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/msgapp/backend/include/site/python2.7 failed with error code 1 in /var/www/msgapp/backend/build/mongoengine
Storing debug log for failure in /home/www/.pip/pip.log
Would be nice to find out how to install it inside virtualenv.
The error message says that installer tries to delete file /var/www/msgapp/backend/lib/python2.7/site-packages/bson/json_util.py but it fails because you don't have permissions.
There are two possible reasons:
You are trying to install mongoengine as a different user from the one who own the virtualenv.
Let's assume that you are logged in as user holms so your bash prompt looks like:
[holms#localhost ~]$
Now check ownership of virtualenv with:
ls -la /var/www/msgapp/ | grep backend
If the output should look like:
drwxr-xr-x. 9 holms holms 4096 05-06 15:49 backend
If instead of holms you get for example bruce then virtualenv is owned by this user and you should perform installation as bruce:
sudo su - bruce
source /var/www/msgapp/backend/bin/activate
pip install mongoengine
You are logged in as the correct user but /var/www/msgapp/backend/lib/python2.7/site-packages/bson/json_util.py is owned by someone else. Again I'm assuming that your username is holms.
Check permissions:
ls -la /var/www/msgapp/backend/lib/python2.7/site-packages/bson/ | grep json_util.py
If you see that someone else e.g. bruce owns this specific file then change the ownerschip:
sudo chown holms:holms /var/www/msgapp/backend/lib/python2.7/site-packages/bson/
Now you should be able to install mongoengine.

easy_install lxml on Python 2.7 on Windows

I'm using python 2.7 on Windows. How come the following error occurs when I try to install [lxml][1] using [setuptools][2]'s easy_install?
C:\>easy_install lxml
Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Reading http://codespeak.net/lxml
Best match: lxml 2.3.3
Downloading http://lxml.de/files/lxml-2.3.3.tgz
Processing lxml-2.3.3.tgz
Running lxml-2.3.3\setup.py -q bdist_egg --dist-dir c:\users\my_user\appdata\local\temp\easy_install-mtrdj2\lxml-2.3.3\egg-dist-tmp-tq8rx4
Building lxml version 2.3.3.
Building without Cython.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
warning: no files found matching 'lxml.etree.c' under directory 'src\lxml'
warning: no files found matching 'lxml.objectify.c' under directory 'src\lxml'
warning: no files found matching 'lxml.etree.h' under directory 'src\lxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'src\lxml'
warning: no files found matching 'etree_defs.h' under directory 'src\lxml'
warning: no files found matching 'pubkey.asc' under directory 'doc'
warning: no files found matching 'tagpython*.png' under directory 'doc'
warning: no files found matching 'Makefile' under directory 'doc'
error: Setup script exited with error: Unable to find vcvarsall.bat
Downloading the package and running setup.py install also doesn't help:
D:\My Documents\Installs\Dev\Python\lxml\lxml-2.3.3>setup.py install
Building lxml version 2.3.3.
Building without Cython.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
running install
running bdist_egg
running egg_info
writing src\lxml.egg-info\PKG-INFO
writing top-level names to src\lxml.egg-info\top_level.txt
writing dependency_links to src\lxml.egg-info\dependency_links.txt
reading manifest file 'src\lxml.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'lxml.etree.c' under directory 'src\lxml'
warning: no files found matching 'lxml.objectify.c' under directory 'src\lxml'
warning: no files found matching 'lxml.etree.h' under directory 'src\lxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'src\lxml'
warning: no files found matching 'etree_defs.h' under directory 'src\lxml'
warning: no files found matching 'pubkey.asc' under directory 'doc'
warning: no files found matching 'tagpython*.png' under directory 'doc'
warning: no files found matching 'Makefile' under directory 'doc'
writing manifest file 'src\lxml.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\lxml
copying src\lxml\builder.py -> build\lib.win32-2.7\lxml
copying src\lxml\cssselect.py -> build\lib.win32-2.7\lxml
copying src\lxml\doctestcompare.py -> build\lib.win32-2.7\lxml
copying src\lxml\ElementInclude.py -> build\lib.win32-2.7\lxml
copying src\lxml\pyclasslookup.py -> build\lib.win32-2.7\lxml
copying src\lxml\sax.py -> build\lib.win32-2.7\lxml
copying src\lxml\usedoctest.py -> build\lib.win32-2.7\lxml
copying src\lxml\_elementpath.py -> build\lib.win32-2.7\lxml
copying src\lxml\__init__.py -> build\lib.win32-2.7\lxml
creating build\lib.win32-2.7\lxml\html
copying src\lxml\html\builder.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\clean.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\defs.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\diff.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\formfill.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\_dictmixin.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\__init__.py -> build\lib.win32-2.7\lxml\html
creating build\lib.win32-2.7\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.win32-2.7\lxml\isoschematron
copying src\lxml\etreepublic.pxd -> build\lib.win32-2.7\lxml
copying src\lxml\tree.pxd -> build\lib.win32-2.7\lxml
copying src\lxml\etree_defs.h -> build\lib.win32-2.7\lxml
creating build\lib.win32-2.7\lxml\isoschematron\resources
creating build\lib.win32-2.7\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win32-2.7\lxml\isoschematron\resources\rng
creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl
creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
error: Unable to find vcvarsall.bat
[1]: http://lxml.de/
[2]: http://pypi.python.org/pypi/setuptools
lxml >= 3.x.x
download one of the MS Windows Installer packages
easy_install "c:/lxml_installer.exe" (credit kobejohn)
MS Windows Installer downloads available for lxml 3.3.5
a list of all binary/egg lxml package downloads.
lxml 2.3.x
there is no windows binary egg for lxml 2.3.3 (2.3.0 is the latest from 2.x.x).
without giving a version number easy_install will download the latest sources,
but you dont have the libxml2 and libxslt installed.
you could install the missing libs or you could try the 2.3 as there are binary eggs for windows:
easy_install lxml==2.3
you can download Unofficial Windows Binaries at:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
e.g. for python 2.7 32bit:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
It is the easiest way in win32.
I ran into the same problem. I don't know about the vcvarsall.bat issue but if you just want to install lxml you can use the graphical installers here:
https://pypi.python.org/pypi/lxml/3.2.3
That worked for me.
The ideal solution (which also works within virtual environments) has been provided here.
Basically, it comes down to downloading a fitting wheel file from here (the "cp" in the filename stands for your Python version) and then simply pip installing it.
It works on my (virtualenv) installation of Python3.3 on Windows 7 64-bit.
You can also use anaconda. Once you have it installed (http://continuum.io/downloads) you can just run conda install lxml to install lxml.

Categories

Resources