error while trying to install cassandra-driver using python
cassandra, datastax-enterprise, pip, python
Solution
i'm able to install cassandra-driver successfully using following command,
command:
pip install cassandra-driver --install-option="--no-cython"
Following is the complete installation log(fyi):
C:\Windows\System32>pip install cassandra-driver --install-option="--no-cython"
c:\python27\lib\site-packages\pip\commands\install.py:194: UserWarning: Disablin
g all use of wheels due to the use of --build-options / --global-options / --ins
tall-options.
cmdoptions.check_install_build_global(options)
Collecting cassandra-driver
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py
:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Na
me Indication) extension to TLS is not available on this platform. This may caus
e the server to present an incorrect TLS certificate, which can cause validation
failures. You can upgrade to a newer version of Python to solve this. For more
information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissi
ngwarning.
SNIMissingWarning
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py
:122: InsecurePlatformWarning: A true SSLContext object is not available. This p
revents urllib3 from configuring SSL appropriately and may cause certain SSL con
nections to fail. You can upgrade to a newer version of Python to solve this. Fo
r more information, see https://urllib3.readthedocs.io/en/latest/security.html#i
nsecureplatformwarning.
InsecurePlatformWarning
Using cached cassandra-driver-3.9.0.tar.gz
Requirement already satisfied: six>=1.6 in c:\python27\lib\site-packages (from c
assandra-driver)
Requirement already satisfied: futures in c:\python27\lib\site-packages (from ca
ssandra-driver)
Skipping bdist_wheel for cassandra-driver, due to binaries being disabled for it
.
Installing collected packages: cassandra-driver
Running setup.py install for cassandra-driver ... done
Successfully installed cassandra-driver-3.9.0
Problem
I'm trying to install cassandra-driver using python(on windows) but it fails with following exception. could someone please help me on this, I have also tried the manual installation process mentioned at following location & its same error, http://datastax.github.io/python-driver/installation.html Install Exception: ``` C:\Windows\System32>pip install cassandra-driver Collecting cassandra-driver Using cached cassandra-driver-3.9.0.tar.gz Requirement already satisfied: six>=1.6 in c:\python27\lib\site-packages (from c assandra-driver) Requirement already satisfied: futures in c:\python27\lib\site-packages (from ca ssandra-driver) Building wheels for collected packages: cassandra-driver Running setup.py bdist_wheel for cassandra-driver ... error Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user01\\appdata\\local\\temp\\pip-build-pa7rph\\ cassandra-driver\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.r ead().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdi st_wheel -d c:\users\user01\appdata\local\temp\tmpbqprncpip-wheel- --python-ta g cp27: Unable to find pgen, not compiling formal grammar. warning: no files found matching '*.pyx' under directory 'Cython\Debugger\Test s' warning: no files found matching '*.pxd' under directory 'Cython\Debugger\Test s' warning: no files found matching '*.h' under directory 'Cython\Debugger\Tests' warning: no files found matching '*.pxd' under directory 'Cython\Utility' Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\users\user01\appdata\local\temp\pip-build-pa7rph\cassandra-driver \setup.py", line 433, in <module> run_setup(None) File "c:\users\user01\appdata\local\temp\pip-build-pa7rph\cassandra-driver \setup.py", line 431, in run_setup **kw) File "c:\python27\lib\distutils\core.py", line 112, in setup _setup_distribution = dist = klass(attrs) File "c:\python27\lib\site-packages\setuptools\dist.py", line 318, in __init __ self.fetch_build_eggs(attrs['setup_requires']) File "c:\python27\lib\site-packages\setuptools\dist.py", line 373, in fetch_ build_eggs replace_conflicting=True, File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 851, in resolve dist = best[req.key] = env.best_match(req, ws, installer) File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 1123, i n best_match return self.obtain(req, installer) File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 1135, i n obtain return installer(requirement) File "c:\python27\lib\site-packages\setuptools\dist.py", line 441, in fetch_ build_egg return cmd.easy_install(req) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", lin e 674, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", lin e 700, in install_item dists = self.install_eggs(spec, download, tmpdir) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", lin e 881, in install_eggs return self.build_and_install(setup_script, setup_base) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", lin e 1120, in build_and_install self.run_setup(setup_script, setup_base, args) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", lin e 1108, in run_setup raise DistutilsError("Setup script exited with %s" % (v.args[0],)) distutils.errors.DistutilsError: Setup script exited with error: INCLUDE envir onment variable is empty ---------------------------------------- Failed building wheel for cassandra-driver Running setup.py clean for cassandra-driver Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user01\\appdata\\local\\temp\\pip-build-pa7rph\\ cassandra-driver\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.r ead().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" cle an --all: Unable to find pgen, not compiling formal grammar. warning: no files found matching '*.pyx' under directory 'Cython\Debugger\Test s' warning: no files found matching '*.pxd' under directory 'Cython\Debugger\Test s' warning: no files found matching '*.h' under directory 'Cython\Debugger\Tests' warning: no files found matching '*.pxd' under directory 'Cython\Utility' Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\users\user01\appdata\local\temp\pip-build-pa7rph\cassandra-driver \setup.py", line 433, in <module> run_setup(None) File "c:\users\user01\appdata\local\temp\pip-build-pa7rph\cassandra-driver \setup.py", line 431, in run_setup **kw) File "c:\python27\lib\distutils\core.py", line 112, in setup _setup_distribution = dist = klass(attrs) File "c:\python27\lib\site-packages\setuptools\dist.py", line 318, in __init __ self.fetch_build_eggs(attrs['setup_requires']) File "c:\python27\lib\site-packages\setuptools\dist.py", line 373, in fetch_ build_eggs replace_conflicting=True, File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 851, in resolve dist = best[req.key] = env.best_match(req, ws, installer) File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 1123, i n best_match return self.obtain(req, installer) File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 1135, i n obtain return installer(requirement) File "c:\python27\lib\site-packages\setuptools\dist.py", line 441, in fetch_ build_egg return cmd.easy_install(req) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", lin e 674, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", lin e 700, in install_item dists = self.install_eggs(spec, download, tmpdir) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", lin e 881, in install_eggs return self.build_and_install(setup_script, setup_base) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", lin e 1120, in build_and_install self.run_setup(setup_script, setup_base, args) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", lin e 1108, in run_setup raise DistutilsError("Setup script exited with %s" % (v.args[0],)) distutils.errors.DistutilsError: Setup script exited with error: INCLUDE envir onment variable is empty ---------------------------------------- Failed cleaning build dir for cassandra-driver Failed to build cassandra-driver Installing collected packages: cassandra-driver Running setup.py install for cassandra-driver ... error Complete output from command c:\python27\python.exe -u -c "import setuptools , tokenize;__file__='c:\\users\\user01\\appdata\\local\\temp\\pip-build-pa7rph \\cassandra-driver\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f .read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" i nstall --record c:\users\user01\appdata\local\temp\pip-inudnv-record\install-r ecord.txt --single-version-externally-managed --compile: Unable to find pgen, not compiling formal grammar. warning: no files found matching '*.pyx' under directory 'Cython\Debugger\Te sts' warning: no files found matching '*.pxd' under directory 'Cython\Debugger\Te sts' warning: no files found matching '*.h' under directory 'Cython\Debugger\Test s' warning: no files found matching '*.pxd' under directory 'Cython\Utility' Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\users\user01\appdata\local\temp\pip-build-pa7rph\cassandra-driv er\setup.py", line 433, in <module> run_setup(None) File "c:\users\user01\appdata\local\temp\pip-build-pa7rph\cassandra-driv er\setup.py", line 431, in run_setup **kw) File "c:\python27\lib\distutils\core.py", line 112, in setup _setup_distribution = dist = klass(attrs) File "c:\python27\lib\site-packages\setuptools\dist.py", line 318, in __in it__ self.fetch_build_eggs(attrs['setup_requires']) File "c:\python27\lib\site-packages\setuptools\dist.py", line 373, in fetc h_build_eggs replace_conflicting=True, File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 851, in resolve dist = best[req.key] = env.best_match(req, ws, installer) File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 1123, in best_match return self.obtain(req, installer) File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 1135, in obtain return installer(requirement) File "c:\python27\lib\site-packages\setuptools\dist.py", line 441, in fetc h_build_egg return cmd.easy_install(req) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", l ine 674, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", l ine 700, in install_item dists = self.install_eggs(spec, download, tmpdir) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", l ine 881, in install_eggs return self.build_and_install(setup_script, setup_base) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", l ine 1120, in build_and_install self.run_setup(setup_script, setup_base, args) File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", l ine 1108, in run_setup raise DistutilsError("Setup script exited with %s" % (v.args[0],)) distutils.errors.DistutilsError: Setup script exited with error: INCLUDE env ironment variable is empty ---------------------------------------- Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\ \users\\user01\\appdata\\local\\temp\\pip-build-pa7rph\\cassandra-driver\\setu p.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 \user01\appdata\local\temp\pip-inudnv-record\install-record.txt --single-versi on-externally-managed --compile" failed with error code 1 in c:\users\user01\a ppdata\local\temp\pip-build-pa7rph\cassandra-driver\ ```