Unable to install stable-baselines3[extra] using pip in Python 3.7 - python

I am trying to install stable-baselines3[extra] using pip install stable baselines3[extra] but it ends up with the error mentioned below. I am using:
User Current Version:- 3.7.13 (default, Apr 24 2022, 01:06:43)
GCC 11.2.0]
On Ubuntu 22.04 in PyCharm as well as Jupyter Notebook. In Google Colab, it installs without any error. What might be the issue?
Here is the python version in Google Colab:
User Current Version:- 3.7.13 (default, Apr 24 2022, 01:04:09)
[GCC 7.5.0]
Here is the error message:
Building wheels for collected packages: AutoROM.accept-rom-license
Building wheel for AutoROM.accept-rom-license (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: '/home/jamshaid/PycharmProjects/Edge Caching using stable-baselines3/virtualenv/bin/python' '/home/jamshaid/PycharmProjects/Edge Caching using stable-baselines3/virtualenv/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py' build_wheel /tmp/tmpp4hjhtme
cwd: /tmp/pip-install-o4p_ksow/autorom-accept-rom-license_8ed43d51fff74c73944a3a9f954d2153
Complete output (62 lines):
running bdist_wheel
running build
running install
running install_egg_info
Traceback (most recent call last):
File "/home/jamshaid/PycharmProjects/Edge Caching using stable-baselines3/virtualenv/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/home/jamshaid/PycharmProjects/Edge Caching using stable-baselines3/virtualenv/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/jamshaid/PycharmProjects/Edge Caching using stable-baselines3/virtualenv/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 262, in build_wheel
metadata_directory)
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 231, in build_wheel
wheel_directory, config_settings)
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
self.run_setup()
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 268, in run_setup
self).run_setup(setup_script=setup_script)
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 18, in <module>
cmdclass={"install": InstallCommand},
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 335, in run
self.run_command('install')
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "setup.py", line 8, in run
super().run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 68, in run
return orig.install.run(self)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 622, in run
self.run_command(cmd_name)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 985, in run_command
cmd_obj.ensure_finalized()
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/usr/lib/python3/dist-packages/setuptools/command/install_egg_info.py", line 26, in finalize_options
('install_dir', 'install_dir'))
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 287, in set_undefined_options
src_cmd_obj.ensure_finalized()
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 17, in finalize_options
self.set_undefined_options('install',('install_layout','install_layout'))
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 290, in set_undefined_options
setattr(self, dst_option, getattr(src_cmd_obj, src_option))
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 103, in __getattr__
raise AttributeError(attr)
AttributeError: install_layout
----------------------------------------
ERROR: Failed building wheel for AutoROM.accept-rom-license
Failed to build AutoROM.accept-rom-license
ERROR: Could not build wheels for AutoROM.accept-rom-license, which is required to install pyproject.toml-based projects

Related

Unable to install PyAutoGui on Linux

I'm trying to install pyautogui, and have an error.
I tried to install pyautogui on older python version, and have same error.
I also tried to install all dependencies separately, and got same error.
Command I ran:
python3.10 -m pip install pyautogui
Python version: 3.10.2
Pip version: 22.0.4
Error:
× Building wheel for pymsgbox (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [60 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/pymsgbox
copying src/pymsgbox/_native_win.py -> build/lib/pymsgbox
copying src/pymsgbox/__init__.py -> build/lib/pymsgbox
running install
running install_lib
Traceback (most recent call last):
File "/home/excl/.local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/home/excl/.local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/excl/.local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 230, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
self.run_setup()
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 267, in run_setup
super(_BuildMetaLegacyBackend,
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 13, in <module>
setup(
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 335, in run
self.run_command('install')
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 68, in run
return orig.install.run(self)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 622, in run
self.run_command(cmd_name)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 985, in run_command
cmd_obj.ensure_finalized()
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 17, in finalize_options
self.set_undefined_options('install',('install_layout','install_layout'))
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 290, in set_undefined_options
setattr(self, dst_option, getattr(src_cmd_obj, src_option))
File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 103, in __getattr__
raise AttributeError(attr)
AttributeError: install_layout. Did you mean: 'install_platlib'?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pymsgbox
Failed to build pyscreeze pymsgbox
ERROR: Could not build wheels for pyscreeze, pymsgbox, which is required to install pyproject.toml-based projects
Fixed with using an older version of dependencies and an older version of pyautogui (0.9.52).
I had the exact issue with other packages after upgrading to Ubuntu 22.04, and it apparently comes from setuptools. Following this: pypa/setuptools#3278
I tried to run: export SETUPTOOLS_USE_DISTUTILS=stdlib in a terminal, and it worked like a charm!

AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64')

I've got this message when I try to install numpy using Python 3.10.
How to fix this?
Copying numpy.egg-info to build/bdist.linux-x86_64/wheel/numpy-1.19.3-py3.10.egg-info
running install_scripts
Traceback (most recent call last):
File "/home/walenty/.local/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/home/walenty/.local/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/walenty/.local/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py", line 204, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 211, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 197, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 248, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 508, in <module>
setup_package()
File "setup.py", line 500, in setup_package
setup(**metadata)
File "/tmp/pip-install-p3yq92pw/numpy/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 328, in run
impl_tag, abi_tag, plat_tag = self.get_tag()
File "/tmp/pip-build-env-plb3t7s6/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64')
----------------------------------------
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
It's a bug in python 3.10, a workaround is installing numpy with the --no-use-pep517 flag. E.g.: pip3.10 install numpy --no-use-pep517
There's a fix for this on the way though, so just waiting is an option as well.

Virtualenv error - build_ext

I have a requirements.txt file that consists of the following modules:
Flask==0.10.1
Flask-Login==0.3.1
Flask-SQLAlchemy==2.0
Jinja2==2.7.3
MarkupSafe==0.23
SQLAlchemy==0.9.8
Werkzeug==0.9.6
argparse==1.2.1
itsdangerous==0.24
rauth==0.7.0
requests==2.4.3
When I activate my virtualenv to install these modules .\venv\Scripts\activate SQLAlchemy fails and MarkupSafe fails. If I deactivate my virtualenv, and simply pip install MarkupSafe or pip install SQLAlchemy - they successfully install.
I am at a loss as to why this is. I have tried uninstalling/reinstalling virtualenv & python - and have spoken with a friend who is quite knowledgable about Python (he thought it was something specific to the Windows environment) and unfortunately am at a loss as to what to try next.
I suspect that it may have something to do with the fact that I deleted a folder named 'Python' underneath user\AppData.. in my attempts to uninstall Python and start from a clean slate...
Here is the relevant output (or at least, what I think is the relevant part of the output) associated with MarkupSafe:
Running setup.py clean for SQLAlchemy
Running setup.py bdist_wheel for markupsafe ... error
Complete output from command c:\test_oauth\venv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\SEANBA~1\\AppData\\Local\\Temp\\pip-build-pvc5zlcc\\markupsafe\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\
r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\SEANBA~1\AppData\Local\Temp\tmpkf78v48_pip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.5
creating build\lib.win32-3.5\markupsafe
copying markupsafe\tests.py -> build\lib.win32-3.5\markupsafe
copying markupsafe\_compat.py -> build\lib.win32-3.5\markupsafe
copying markupsafe\_constants.py -> build\lib.win32-3.5\markupsafe
copying markupsafe\_native.py -> build\lib.win32-3.5\markupsafe
copying markupsafe\__init__.py -> build\lib.win32-3.5\markupsafe
running egg_info
writing dependency_links to MarkupSafe.egg-info\dependency_links.txt
writing MarkupSafe.egg-info\PKG-INFO
writing top-level names to MarkupSafe.egg-info\top_level.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-3.5\markupsafe
running build_ext
building 'markupsafe._speedups' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\markupsafe\setup.py", line 120, in <module>
try_building_extension()
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\markupsafe\setup.py", line 99, in try_building_extension
run_setup(True)
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\markupsafe\setup.py", line 93, in run_setup
ext_modules=ext_modules,
File "C:\Python35-32\Lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python35-32\Lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\test_oauth\venv\lib\site-packages\wheel\bdist_wheel.py", line 179, in run
self.run_command('build')
File "C:\Python35-32\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python35-32\Lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Python35-32\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\markupsafe\setup.py", line 41, in run
build_ext.run(self)
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 338, in run
self.build_extensions()
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 447, in build_extensions
self._build_extensions_serial()
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 472, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\markupsafe\setup.py", line 47, in build_extension
build_ext.build_extension(self, ext)
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 532, in build_extension
depends=ext.depends)
File "C:\Python35-32\Lib\distutils\_msvccompiler.py", line 306, in compile
self.initialize()
File "C:\Python35-32\Lib\distutils\_msvccompiler.py", line 199, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\test_oauth\venv\lib\site-packages\setuptools\msvc.py", line 206, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_ver_min=14.0).return_env()
TypeError: __init__() got an unexpected keyword argument 'vc_ver_min'
----------------------------------------
Failed building wheel for markupsafe
Here is the relevant output (or at least, what I think is the relevant part of the output) associated with the SQLAlchemy failure:
running build_ext
building 'sqlalchemy.cprocessors' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\SQLAlchemy\setup.py", line 170, in <module>
run_setup(True)
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\SQLAlchemy\setup.py", line 150, in run_setup
**kwargs
File "C:\Python35-32\Lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python35-32\Lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\test_oauth\venv\lib\site-packages\wheel\bdist_wheel.py", line 179, in run
self.run_command('build')
File "C:\Python35-32\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python35-32\Lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Python35-32\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\SQLAlchemy\setup.py", line 67, in run
build_ext.run(self)
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 338, in run
self.build_extensions()
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 447, in build_extensions
self._build_extensions_serial()
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 472, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\SQLAlchemy\setup.py", line 73, in build_extension
build_ext.build_extension(self, ext)
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 532, in build_extension
depends=ext.depends)
File "C:\Python35-32\Lib\distutils\_msvccompiler.py", line 306, in compile
self.initialize()
File "C:\Python35-32\Lib\distutils\_msvccompiler.py", line 199, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\test_oauth\venv\lib\site-packages\setuptools\msvc.py", line 206, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_ver_min=14.0).return_env()
TypeError: __init__() got an unexpected keyword argument 'vc_ver_min'
----------------------------------------
Failed building wheel for SQLAlchemy
I found the answer to my issue.
The environment variable for python had been incorrectly configured (it had been made it's own system variable, rather than simply being added to the 'path' system variable).
Once this was changed, the issues disappeared.

ImportError: No module named pyodbc (Windows )

Python 3.3, pip is installed and PATH is:
C:\Python33\Scripts
I have downloaded visual c++ 2010, do I need to change any configuration or add the .bat file to python 33 package from vc++?
When I try to install pyodbc I get the following:
C:\Users\elyon>pip install https://pyodbc.googlecode.com/files/pyodbc-3.0.7.zip Collecting https://pyodbc.googlecode.com/files/pyodbc-3.0.7.zip Using cached https://pyodbc.googlecode.com/files/pyodbc-3.0.7.zip Installing collected packages: pyodbc Running setup.py install for pyodbc
building 'pyodbc' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\elyon\appdata\local\temp\pip-30p009-build\setup.py", lin e 288, in <module>
main()
File "c:\users\elyon\appdata\local\temp\pip-30p009-build\setup.py", lin e 108, in main
setup(**kwargs)
File "C:\Python33\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python33\lib\distutils\dist.py", line 917, in run_commands
self.run_command(cmd)
File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
cmd_obj.run()
File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\install.py", line 61, in run
File "C:\Python33\lib\distutils\command\install.py", line 569, in run
self.run_command('build')
File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
cmd_obj.run()
File "C:\Python33\lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
cmd_obj.run()
File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\build_ext.py", line 50, in run
File "C:\Python33\lib\distutils\command\build_ext.py", line 347, in run
self.build_extensions()
File "C:\Python33\lib\distutils\command\build_ext.py", line 456, in build_ extensions
self.build_extension(ext)
File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\build_ext.py", line 183, in build_extension
File "C:\Python33\lib\distutils\command\build_ext.py", line 511, in build_ extension
depends=ext.depends)
File "C:\Python33\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python33\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \msvc9_support.py", line 52, in query_vcvarsall
File "C:\Python33\lib\distutils\msvc9compiler.py", line 287, in query_vcva rsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']
Complete output from command C:\Python33\python.EXE -c "import setuptools, t okenize;__file__='c:\\users\\elyon\\appdata\\local\\temp\\pip-30p009-build\\s etup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace(' \r\n', '\n'), __file__, 'exec'))" install --record c:\users\elyon\appdata\loc al\temp\pip-v0vcs5-record\install-record.txt
--single-version-externally-managed --compile:
running install
running build
running build_ext
building 'pyodbc' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\elyon\appdata\local\temp\pip-30p009-build\setup.py", lin e 288, in <module>
main()
File "c:\users\elyon\appdata\local\temp\pip-30p009-build\setup.py", lin e 108, in main
setup(**kwargs)
File "C:\Python33\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python33\lib\distutils\dist.py", line 917, in run_commands
self.run_command(cmd)
File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
cmd_obj.run()
File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\install.py", line 61, in run
File "C:\Python33\lib\distutils\command\install.py", line 569, in run
self.run_command('build')
File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
cmd_obj.run()
File "C:\Python33\lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
cmd_obj.run()
File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\build_ext.py", line 50, in run
File "C:\Python33\lib\distutils\command\build_ext.py", line 347, in run
self.build_extensions()
File "C:\Python33\lib\distutils\command\build_ext.py", line 456, in build_ extensions
self.build_extension(ext)
File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \command\build_ext.py", line 183, in build_extension
File "C:\Python33\lib\distutils\command\build_ext.py", line 511, in build_ extension
depends=ext.depends)
File "C:\Python33\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python33\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python33\lib\site-packages\setuptools-12.0.3-py3.3.egg\setuptools \msvc9_support.py", line 52, in query_vcvarsall
File "C:\Python33\lib\distutils\msvc9compiler.py", line 287, in query_vcva rsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']
----------------------------------------
Command "C:\Python33\python.EXE -c "import setuptools, tokenize;__file__='c: \\users\\elyon\\appdata\\local\\temp\\pip-30p009-build\\setup.py';exec(compil e(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file
__, 'exec'))" install --record c:\users\elyon\appdata\local\temp\pip-v0vcs5-r ecord\install-record.txt --single-version-externally-managed
--compile" failed w ith error code 1 in
c:\users\elyon\appdata\local\temp\pip-30p009-build
This is the code:
import pyodbc
print pyodbc.dataSources()
print "Connecting via ODBC"
conn = pyodbc.connect("DRIVER={Netezza};SERVER=netezza201;PORT=5480;DATABASE=Test;UID=CompanyUser;PWD=Password!;")
cursor = conn.cursor()
I had this problem under Python 2.7.9 using SQLAlchemy and the solution was to unpack the pyodbc .egg file in my site-packages folder.
I must note that I didn't compile it myself, I downloaded the binary (pyodbc-3.0.7.win32-py2.7.exe) and I installed it using easy_install pyodbc-3.0.7.win32-py2.7.exe
P.S: Newer .whl type installers can be found here, you can install them using pip install [.whl file]. That might also help you get pyodbc installed.
Navigate to the \Lib\site-packages folder for your current virtualenv (or under your main Python installation folder if you're not using a virtualenv).
Rename pyodbc-3.0.7-py2.7-win32.egg to pyodbc-3.0.7-py2.7-win32.zip.
Extract the zip file and place the contents directly in your \Lib\site-packages folder.
After I did this the pyodbc module go recognised and SQLAlchemy could import it.

Is there 64-bit version pymongo?

When i install pymongo using easy_install with 64-bit python, exception happens. But it works with 32-bit python. It seems only 32-bit python is supported.
So i want to know whether 64-bit pymongo exists?
Thanks.
--- more details ---
running install
running bdist_egg
running egg_info
writing pymongo.egg-info\PKG-INFO
writing top-level names to pymongo.egg-info\top_level.txt
writing dependency_links to pymongo.egg-info\dependency_links.txt
reading manifest file 'pymongo.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.h' under directory 'pymongo'
writing manifest file 'pymongo.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
building 'bson._cbson' extension
Traceback (most recent call last):
File "F:\mongodb-mongo-python-driver-7269ec4\setup.py", line 184, in <module>
"doc": doc})
File "C:\Python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "build\bdist.win-amd64\egg\setuptools\command\install.py", line 76, in ru
n
File "build\bdist.win-amd64\egg\setuptools\command\install.py", line 96, in do
_egg_install
File "C:\Python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "build\bdist.win-amd64\egg\setuptools\command\bdist_egg.py", line 175, in
run
File "build\bdist.win-amd64\egg\setuptools\command\bdist_egg.py", line 161, in
call_command
File "C:\Python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "build\bdist.win-amd64\egg\setuptools\command\install_lib.py", line 20, i
n run
File "C:\Python26\lib\distutils\command\install_lib.py", line 112, in build
self.run_command('build_ext')
File "C:\Python26\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "F:\mongodb-mongo-python-driver-7269ec4\setup.py", line 108, in run
build_ext.run(self)
File "C:\Python26\lib\distutils\command\build_ext.py", line 345, in run
self.build_extensions()
File "C:\Python26\lib\distutils\command\build_ext.py", line 471, in build_exte
nsions
self.build_extension(ext)
File "F:\mongodb-mongo-python-driver-7269ec4\setup.py", line 118, in build_ext
ension
build_ext.build_extension(self, ext)
File "C:\Python26\lib\distutils\command\build_ext.py", line 536, in build_exte
nsion
depends=ext.depends)
File "C:\Python26\lib\distutils\msvc9compiler.py", line 448, in compile
self.initialize()
File "C:\Python26\lib\distutils\msvc9compiler.py", line 358, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python26\lib\distutils\msvc9compiler.py", line 274, in query_vcvarsal
l
raise ValueError(str(list(result.keys())))
ValueError: [u'path']
Run vcvarsall.bat first, then install pymongo.

Categories

Resources