I tried installing turbodbc and it gives me the following error and not sure what's wrong here.
My python version is 3.7
My command line output from Windows 10 Pro.
C:\Users\marunachalam\Downloads>pip install turbodbc
Collecting turbodbc
Using cached turbodbc-3.3.0.tar.gz (78 kB)
Requirement already satisfied: pybind11>=2.2.0 in c:\users\marunachalam\appdata\local\programs\python\python37-32\lib\site-packages (from turbodbc) (2.4.3)
Requirement already satisfied: six in c:\users\marunachalam\appdata\local\programs\python\python37-32\lib\site-packages (from turbodbc) (1.13.0)
Building wheels for collected packages: turbodbc
Building wheel for turbodbc (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\marunachalam\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MARUNA~1\\AppData\\Local\\Temp\\pip-install-akbat0nu\\turbodbc\\setup.py'"'"'; __file__='"'"'C:\\Users\\MARUNA~1\\AppData\\Local\\Temp\\pip-install-akbat0nu\\turbodbc\\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\MARUNA~1\AppData\Local\Temp\pip-wheel-qdxgecq5'
cwd: C:\Users\MARUNA~1\AppData\Local\Temp\pip-install-akbat0nu\turbodbc\
Complete output (27 lines):
warning: BOOST_ROOT enviroment variable not set
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\turbodbc
copying turbodbc\api_constants.py -> build\lib.win32-3.7\turbodbc
copying turbodbc\connect.py -> build\lib.win32-3.7\turbodbc
copying turbodbc\connection.py -> build\lib.win32-3.7\turbodbc
copying turbodbc\constructors.py -> build\lib.win32-3.7\turbodbc
copying turbodbc\cursor.py -> build\lib.win32-3.7\turbodbc
copying turbodbc\data_types.py -> build\lib.win32-3.7\turbodbc
copying turbodbc\exceptions.py -> build\lib.win32-3.7\turbodbc
copying turbodbc\options.py -> build\lib.win32-3.7\turbodbc
copying turbodbc\__init__.py -> build\lib.win32-3.7\turbodbc
running egg_info
writing turbodbc.egg-info\PKG-INFO
writing dependency_links to turbodbc.egg-info\dependency_links.txt
writing requirements to turbodbc.egg-info\requires.txt
writing top-level names to turbodbc.egg-info\top_level.txt
reading manifest file 'turbodbc.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'turbodbc.egg-info\SOURCES.txt'
running build_ext
building 'turbodbc_intern' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for turbodbc
Running setup.py clean for turbodbc
Failed to build turbodbc
Disclaimer : Turbodc installation has problems with python version 3.8+. You will be able to install Turbodc on python 3.8+, but you'll face another error while using it (https://github.com/blue-yonder/turbodbc/issues/258). So if you want to use Turbodbc, better to stick to python version 3.7 and below. Now lets get Turbodbc installed on your machine
This is going to be a long one. Stay with me -
As the error states, firstly you need 'Microsoft Visual C++ Build Tools'. You'll get it on this page: https://visualstudio.microsoft.com/downloads/. Scroll down to 'Build Tools for Visual Studio'. Download it.
Run the installer. Select 'C++ build tools' to install. Make sure to choose 'Windows 10 (or whatever version you prefer) SDK' as well to prevent this error later - https://github.com/openssl/openssl/issues/586
After installing build tools if you try to install Turbodbc (pip install turbodbc), you'll see another error - python fatal error C1083: Cannot open include file: 'boost/locale.hpp'. Which is to say the battle is half won. To resolve this error follow the steps listed here - https://github.com/blue-yonder/turbodbc/issues/236. For your ease, I'll copy them below -
Download boost from https://www.boost.org/ (click on the "Current Release" version link, in my case "Version 1.72.0", then download the Windows zip file).
Unzip the zipfile somewhere on your PC.
In a command prompt, navigate to the boost top-level directory.
Run .\bootstrap.bat (this generates the b2 executable)
Run .\b2 (this generates the stage directory and contents, takes a few minutes to run)
Set the BOOST_ROOT env variable with something like
set BOOST_ROOT=C:\your\path\to\boost\boost_1_72_0\boost_1_72_0
Run pip install turbodbc
That's all. Turbodbc should now be installed in your machine.
Try follow
Sat, Jan 2 at 9:16 PM
https://www.boost.org/doc/libs/1_71_0/more/getting_started/windows.html. got working on windows 10 using Python39, download/install MS Visual Studio 2019 Community, unzip boost, set BOOST_ROOT env variable, rerun pip install turbodbc
Related
I'm following the turorial found here: https://realpython.com/storing-images-in-python/.
The first few steps in the tutorial work well; however, when I get to the step
$ pip install lmdb
I get more than 100 errors, and the installer gives up. I'm wondering how to correct this problem.
My entry of the step shown above looks like this in the Pycharm terminal:
(venv) C:\Users\User\PycharmProjects\OpenCVExamples>pip install lmdb
After entering the pip command shown above, I see the following on the screen:
Collecting lmdb
Using cached https://files.pythonhosted.org/packages/86/5
/6ad690daeaa00b328606bf2fa435244a11cc2dd9aedac6ef4d2ef2a21f6e/lmdb
0.96.tar.gz
Installing collected packages: lmdb
Running setup.py install for lmdb ... error
Then I get a dump showing the following steps that were taken:
py-lmdb: Using bundled liblmdb; override with LMDB_FORCE_SYSTEM=1.
py-lmdb: Using CPython extension; override with LMDB_FORCE_CFFI=1.
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\lmdb
copying lmdb\cffi.py -> build\lib.win32-3.7\lmdb
copying lmdb\tool.py -> build\lib.win32-3.7\lmdb
copying lmdb\_config.py -> build\lib.win32-3.7\lmdb
copying lmdb\__init__.py -> build\lib.win32-3.7\lmdb
copying lmdb\__main__.py -> build\lib.win32-3.7\lmdb
running build_ext
building 'cpython' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\lmdb
creating build\temp.win32-3.7\Release\lib
Next, I get a few warnings then a list of more than 100 errors. The warnings and the first few errors are shown below:
cl : Command line warning D9025 : overriding '/DNDEBUG' with '/UNDEBUG'
cl : Command line warning D9025 : overriding '/W3' with '/w'
error C2146: syntax error: missing ')' before identifier 'uintptr_t'
error C2059: syntax error: ')'
error C2085: '_StackCookie': not in formal parameter list
Finally, I get an error at the end a red font. The final error is:
Command "C:\Users\User\PycharmProjects\OpenCVExamples\venv\Script
\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Use
\\AppData\\Local\\Temp\\pip-install-227nwnf7\\lmdd
\\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\User\AppData\Local\Te
mp\pip-record-a9unp95q\install-record.txt --single-version-externally
managed --compile --install-headers C:\Users\User\PycharmProject
\OpenCVExamples\venv\include\site\python3.7\lmdb" fai
led with error code 1 in C:\Users\User\AppData\Local\Temp\pip-install
227nwnf7\lmdb\
Since nobody has entered an official answer after 2.5 years, I decided to copy the answer given above in the comments by furas:
It seems there is error in C/C++ code. So you can write to author or you may try to use Anaconda which should have precompiled module LMDB and it doesn't use C/C++ compiler. You can also check on Unofficial Windows Binaries for Python Extension Packages
The pip install py3mqi fails with the following error.
(mq) C:\Temp\>pip install py3mqi
Collecting py3mqi
Downloading https://files.pythonhosted.org/packages/5a/b7/cbe684e6a2a7f00dee116392d38c17c03b8281a8b5a021b655833233de26/py3mqi-1.6.0.tar.gz (65kB)
|████████████████████████████████| 71kB 770kB/s
Building wheels for collected packages: py3mqi
Building wheel for py3mqi (setup.py) ... error
ERROR: Complete output from command 'c:\users\dhdyk0\envs\mq\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\dhdyk0\\AppData\\Local\\Temp\\pip-install-jmsvk9ya\\py3mqi\\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\dhdyk0\AppData\Local\Temp\pip-wheel-3y2i7hfm' --python-tag cp36:
ERROR: Building PyMQI client 32bits
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pymqi
copying pymqi\__init__.py -> build\lib.win32-3.6\pymqi
copying pymqi\CMQC.py -> build\lib.win32-3.6\pymqi
copying pymqi\CMQCFC.py -> build\lib.win32-3.6\pymqi
copying pymqi\CMQXC.py -> build\lib.win32-3.6\pymqi
copying pymqi\CMQZC.py -> build\lib.win32-3.6\pymqi
running build_ext
building 'pymqi.pymqe' extension
error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib'
I've tried to install both, pymqi and py3mqi and I'm getting the same error. I'm using Python 3.6, 32-bit.
Also, I have MQ Client installed as well as Visual Studio 15. There is the following path on my disk: C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC, but PlatformSDK\\lib is missing.
As JoshMC states pymqi now supports Python 3, and should be what you are using.
pymqi binds to the MQI C Layer, and requires access to MQ C Header files as well as a C compiler / linker, when it installs.
The error you are getting is a common Visual Studio error, when the Windows Platform SDK has not been installed. Essentially installing Visual Studio does not mean that you have installed the C / C++ compiler, and you need to do that also.
Did you consider trying to install Visual Studio 2019 with the python and c package?
That is needed for some packages.
An other possible option is, that py3mqi isn't available for Python 3.6.*
I need to install misaka, but when I use pip install misaka I get an error that reads:
Command "python setup.py egg_info" failed with error code 1 in C:\Users\JHONAT~1\AppData\Local\Temp\pip-build-utm0mant\misaka\
I don't really know what to do to solve it. I've tried using pip3 instead, no change and using pip2 also. I'm currently using python 3.6.4 and Django 1.11.
Collecting misaka
Using cached https://files.pythonhosted.org/packages/47/c2/ba9c82ae0ec62bcec62d690e715be6ead4457f83000f4ef6e919f77a8e5f/misaka-2.1.0.tar.gz
Collecting cffi>=1.0.0 (from misaka)
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/2f/85/a9184548ad4261916d08a50d9e272bf6f93c54f3735878fbfc9335efd94b/cffi-1.11.5-cp36-cp36m-win_amd64.whl (166kB)
100% |████████████████████████████████| 174kB 17kB/s
Collecting pycparser (from cffi>=1.0.0->misaka)
Building wheels for collected packages: misaka
Running setup.py bdist_wheel for misaka ... error
Complete output from command g:\programming\anaconda3\envs\virtual\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\JHONAT~1\\AppData\\Local\\Temp\\pip-b
uild-9fgtbhdd\\misaka\\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:\U
sers\JHONAT~1\AppData\Local\Temp\tmptz2d209jpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\misaka
copying misaka\api.py -> build\lib.win-amd64-3.6\misaka
copying misaka\callbacks.py -> build\lib.win-amd64-3.6\misaka
copying misaka\constants.py -> build\lib.win-amd64-3.6\misaka
copying misaka\utils.py -> build\lib.win-amd64-3.6\misaka
copying misaka\__init__.py -> build\lib.win-amd64-3.6\misaka
running build_ext
generating cffi module 'build\\temp.win-amd64-3.6\\Release\\misaka._hoedown.c'
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
building 'misaka._hoedown' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Failed building wheel for misaka
Running setup.py clean for misaka
Failed to build misaka
Installing collected packages: pycparser, cffi, misaka
Running setup.py install for misaka ... error
Complete output from command g:\programming\anaconda3\envs\virtual\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\JHONAT~1\\AppData\\Local\\Temp\\pip
-build-9fgtbhdd\\misaka\\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\JHONAT~1\AppData\Local\Temp\pip-crdk5uw4-record\install-record.txt --single-version-externally-managed --compile --install-headers g:\programming\anaconda3\envs\virtual\inc
lude\site\python3.6\misaka:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\misaka
copying misaka\api.py -> build\lib.win-amd64-3.6\misaka
copying misaka\callbacks.py -> build\lib.win-amd64-3.6\misaka
copying misaka\constants.py -> build\lib.win-amd64-3.6\misaka
copying misaka\utils.py -> build\lib.win-amd64-3.6\misaka
copying misaka\__init__.py -> build\lib.win-amd64-3.6\misaka
running build_ext
generating cffi module 'build\\temp.win-amd64-3.6\\Release\\misaka._hoedown.c'
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
building 'misaka._hoedown' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "g:\programming\anaconda3\envs\virtual\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\JHONAT~1\\AppData\\Local\\Temp\\pip-build-9fgtbhdd\\misaka\
\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\JHONAT~1\AppDat
a\Local\Temp\pip-crdk5uw4-record\install-record.txt --single-version-externally-managed --compile --install-headers g:\programming\anaconda3\envs\virtual\include\site\python3.6\misa
ka" failed with error code 1 in C:\Users\JHONAT~1\AppData\Local\Temp\pip-build-9fgtbhdd\misaka\
My internet connection is not the fastest, right now im downloading VS2015 to see if it solves my problem, because the link provided by the log doesnt work anymore. thanks for the replies, i'll update when the download finishes
am take this way
1- install conda
with prombt of conda
install :
conda install libpython m2w64-toolchain -c msys2
2-upgrade your pip by : python -m pip install --upgrade pip
3-instal misaka : pip install misaka
From package documentation
If you’re installing from source and are using Debian or a Debian
derivative (e.g. Ubuntu) make sure build-essential, python-dev and
libffi-dev are installed.
sudo apt-get install python-setuptools python-dev build-essential
EDIT
Windows:
Your error clearly states you need to install Microsoft Visual C++ 14.0
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft
Visual C++ Build Tools":
https://go.microsoft.com/fwlink/?LinkId=691126
Working solution!
Go to https://visualstudio.microsoft.com/downloads/
scroll down one page and download Visual Studio 2017 community.
Go through following link to download the required components for Microsoft Visual C++ 14.0, the link provides what components to be selected while downloading.
https://developercommunity.visualstudio.com/content/problem/409173/error-microsoft-visual-c-140-is-required.html
Hope it works as it worked for me!
Do this:
git clone https://github.com/FSX/misaka.git
2.cd misaka
3.python setup.py install
Only working solution I found for windows,
Go to Visual Studio download page as mentioned in the error, download the installer for the latest version, run the installer,
if you already installed visual studio then click modify,
make sure to select the required packages, especially 'windows 10 sdk' as in the image [Around 1.2gb download and 4.2gb disk space needed in first install].
Then run pip install misaka, to successfully build the package.
If Anaconda distribution is installed in your system, you can try running
conda install libpython m2w64-toolchain -c msys2
like as suggested in other answers, but it won't work for all windows-python version combinations.Any time, building the package requires visual c++.
I'm using python 2.7 on a windows box.I'm able to install flask using pip install, as you can see below:
However, after I created a virtualenv, I got below error when trying to do the same thing.
scripts:
$pip install virtualenv
$cd /d d:
$mkdir test
$cd test
$virtualenv flaskEnv
$cd flaskEnv/Scritps/
$activate
$cd ../../
$pip install flask
log file as below:
Collecting flask
Using cached Flask-0.11.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): click>=2.0 in c:\projects\flask-react\flsk\lib\site-packages (from flask)
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in c:\projects\flask-react\flsk\lib\site-packages (from flask)
Collecting Jinja2>=2.4 (from flask)
Using cached Jinja2-2.8-py2.py3-none-any.whl
Collecting itsdangerous>=0.21 (from flask)
Collecting MarkupSafe (from Jinja2>=2.4->flask)
Using cached MarkupSafe-0.23.tar.gz
Building wheels for collected packages: MarkupSafe
Running setup.py bdist_wheel for MarkupSafe: started
Running setup.py bdist_wheel for MarkupSafe: finished with status 'error'
Complete output from command c:\projects\flask-react\flsk\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\admini~1\\appdata\\local\\temp\\pip-build-3ep417\\MarkupSafe\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d c:\users\admini~1\appdata\local\temp\tmp8mkr70pip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\markupsafe
copying markupsafe\tests.py -> build\lib.win32-2.7\markupsafe
copying markupsafe\_compat.py -> build\lib.win32-2.7\markupsafe
copying markupsafe\_constants.py -> build\lib.win32-2.7\markupsafe
copying markupsafe\_native.py -> build\lib.win32-2.7\markupsafe
copying markupsafe\__init__.py -> build\lib.win32-2.7\markupsafe
running egg_info
writing MarkupSafe.egg-info\PKG-INFO
writing top-level names to MarkupSafe.egg-info\top_level.txt
writing dependency_links to MarkupSafe.egg-info\dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'MarkupSafe.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MarkupSafe.egg-info\SOURCES.txt'
copying markupsafe\_speedups.c -> build\lib.win32-2.7\markupsafe
running build_ext
building 'markupsafe._speedups' extension
error: [Error 2] The system cannot find the file specified
----------------------------------------
Running setup.py clean for MarkupSafe
Failed to build MarkupSafe
Installing collected packages: MarkupSafe, Jinja2, itsdangerous, flask
Running setup.py install for MarkupSafe: started
Running setup.py install for MarkupSafe: finished with status 'error'
Complete output from command c:\projects\flask-react\flsk\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\admini~1\\appdata\\local\\temp\\pip-build-3ep417\\MarkupSafe\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\admini~1\appdata\local\temp\pip-8v3_ep-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\projects\flask-react\flsk\include\site\python2.7\MarkupSafe:
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\markupsafe
copying markupsafe\tests.py -> build\lib.win32-2.7\markupsafe
copying markupsafe\_compat.py -> build\lib.win32-2.7\markupsafe
copying markupsafe\_constants.py -> build\lib.win32-2.7\markupsafe
copying markupsafe\_native.py -> build\lib.win32-2.7\markupsafe
copying markupsafe\__init__.py -> build\lib.win32-2.7\markupsafe
running egg_info
writing MarkupSafe.egg-info\PKG-INFO
writing top-level names to MarkupSafe.egg-info\top_level.txt
writing dependency_links to MarkupSafe.egg-info\dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'MarkupSafe.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MarkupSafe.egg-info\SOURCES.txt'
copying markupsafe\_speedups.c -> build\lib.win32-2.7\markupsafe
running build_ext
building 'markupsafe._speedups' extension
error: [Error 2] The system cannot find the file specified
Does the error message mean something to anyone?
thanks
This issue seems to be related with the setuptools version installed in your virtualenv. Downgrading to an older version fixed it for me.
From your virtualenv:
pip install setuptools==21.2.1
pip install flask
I had this problem yesterday. I resolved it by downloading the MarkupSafe wheel and installing with pip. The problem was way over my head. Something about compiler flags in order to suppress an error when generating the Speedups file, I think.
1) Download the wheel from the link above.
2) On Windows, open a command window in the same directory as the wheel.
3) run "pip Install "
The setup.py of MarkupSafe is broken for Win7 on my system where there is no C compiler. (I keep a separate VM for VC++ work) I did this to get it working:
pip download MarkupSafe
mkdir temp
open MarkupSafe-0.23.tar.gz with 7-zip, extract all to temp
cd temp
edit setup.py line 119 to read: if 0: #not (is_pypy or is_jython):
python setup.py install
I did not try to debug setup.py to work correctly. I just wanted to try out Flask since it's supposed to be lightweight and easy to learn, and the official docs say it installs on Windows. Maybe I should go back to Perl...
Unlike the other poster, a global pip install of MarkupSafe didn't work for me either.
These links have other views/insights on the problem:
https://github.com/pallets/markupsafe/issues/26
https://github.com/babun/babun/issues/315
ok. I figure it out. I don't think there is anything wrong in the way I install flask, as I already mentioned in my question, I am able to install it globally (without running within a virtualenv).
the MarkupSafe package has an extension which is implement using c, and I don't have windows sdk installed on my local machine, so when ve_build_ext runs,
**** it always fail **
the difference is if not (is_pypy or is_jython) , it gives a warning, which is what i got when installing it globally; it crashes, though, when running under a virtualenv. So I'm pretty sure that hasattr(sys, 'pypy_version_info') return true when running under a virtualenv.
Does anybody have an idea what "hasattr(sys, 'pypy_version_info')" mean??
# fail safe compilation shamelessly stolen from the simplejson
# setup.py file. Original author: Bob Ippolito
is_jython = 'java' in sys.platform
is_pypy = hasattr(sys, 'pypy_version_info')
def run_setup(with_binary):
ext = Extension('markupsafe._speedups', ['markupsafe/_speedups.c'])
ext_modules = [ext] if with_binary else []
def try_building_extension():
try:
run_setup(True)
except BuildFailed:
LINE = '=' * 74
BUILD_EXT_WARNING = 'WARNING: The C extension could not be ' \
'compiled, speedups are not enabled.'
echo(LINE)
echo(BUILD_EXT_WARNING)
echo('Failure information, if any, is above.')
echo('Retrying the build without the C extension now.')
echo()
run_setup(False)
echo(LINE)
echo(BUILD_EXT_WARNING)
echo('Plain-Python installation succeeded.')
echo(LINE)
if not (is_pypy or is_jython):
try_building_extension()
else:
run_setup(False)
I had this issue today and was able to resolve it by manually installing MarkupSafe from a wheel file, per Lincoln's suggestion above. You can download the appropriate file here. There were several available. I don't know what the difference between all of them is, but the only one that would even install on Windows 10 was the one called MarkupSafe-0.23-cp27-none-win32.whl. After downloading it, I copied it into the directory I created using virtualenv (not sure if that's necessary but that's what I did) and installed it with pip:
C:\flask-test\venv>pip install MarkupSafe-0.23-cp27-none-win32.whl
from that directory. After that I went back to the main directory and installed Flask
C:\flask-test\venv>cd ..
C:\flask-test>pip install Flask
and it worked fine.
To connect to Hive using Python 3.5.1
I was able to install pyhs2, thrift and Pyhive.
But during installation of sasl which is needed by phyhs2, got this error.
running install
running build
running build_py
creating build
creating build\lib.win32-3.5
creating build\lib.win32-3.5\sasl
copying sasl\__init__.py -> build\lib.win32-3.5\sasl
running egg_info
writing dependency_links to sasl.egg-info\dependency_links.txt
writing top-level names to sasl.egg-info\top_level.txt
writing sasl.egg-info\PKG-INFO
writing requirements to sasl.egg-info\requires.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'sasl.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'sasl.egg-info\SOURCES.txt'
copying sasl\saslwrapper.cpp -> build\lib.win32-3.5\sasl
copying sasl\saslwrapper.h -> build\lib.win32-3.5\sasl
copying sasl\saslwrapper.pyx -> build\lib.win32-3.5\sasl
running build_ext
building 'sasl.saslwrapper' extension
error: Unable to find vcvarsall.bat
----------------------------------------
Command "c:\users\mmt6168\appdata\local\programs\python\python35-32\python.exe -
u -c "import setuptools, tokenize;__file__='C:\\Users\\mmt6168\\AppData\\Local\\
Temp\\pip-build-qvb3rz0y\\sasl\\setup.py';exec(compile(getattr(tokenize, 'open',
open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --rec
ord C:\Users\mmt6168\AppData\Local\Temp\pip-irc4xc0f-record\install-record.txt -
-single-version-externally-managed --compile" failed with error code 1 in C:\Use
rs\mmt6168\AppData\Local\Temp\pip-build-qvb3rz0y\sasl\
Python is struggling to find a C++ compiler that matches the compiler that was used to compile your version of Python for Windows. For Python 3.5 on Windows, you need Visual C++ 14.0. A quick fix for this version is to install Visual Studio Community 2015.
Otherwise, see here: https://wiki.python.org/moin/WindowsCompilers#Microsoft_Visual_C.2B-.2B-_14.0_standalone:_Visual_C.2B-.2B-_Build_Tools_2015_.28x86.2C_x64.2C_ARM.29