I cannot install gevent within a virtualenv with
CFLAGS='-std=c99' pip install gevent
I have tried CFLAGS='-std=c99' pip install gevent as suggested here as well as with sudo but it still doesn't work. Frustratingly, I can install with no problems outside my virtualenv. Here is the error:
configure: error: in `/Users/mc/.virtualenvs/mmbot/build/gevent/deps/libev':
configure: error: C compiler cannot create executables
See `config.log' for more details
Running '(cd "/Users/mc/.virtualenvs/mmbot/build/gevent/deps/libev" && sh ./configure && cp config.h "$OLDPWD" ) > configure-output.txt' in /Users/mc/.virtualenvs/mmbot/build/gevent/build/temp.macosx-10.12-x86_64-2.7/libev
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/mc/.virtualenvs/mmbot/build/gevent/setup.py", line 183, in <module>
run_setup(EXT_MODULES, run_make=_BUILDING)
File "/Users/mc/.virtualenvs/mmbot/build/gevent/setup.py", line 168, in run_setup
"Development Status :: 4 - Beta"
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/setuptools/command/install.py", line 59, in run
return orig.install.run(self)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 563, in run
self.run_command('build')
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/setuptools/command/build_ext.py", line 49, in run
_build_ext.run(self)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 449, in build_extensions
self.build_extension(ext)
File "_setuputils.py", line 159, in build_extension
self.gevent_prepare(ext)
File "_setuputils.py", line 156, in gevent_prepare
configure(self, ext)
File "_setuplibev.py", line 55, in configure_libev
system(libev_configure_command)
File "_setuputils.py", line 139, in system
if _system(cmd):
File "_setuputils.py", line 135, in _system
return check_call(cmd, shell=True)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '(cd "/Users/mc/.virtualenvs/mmbot/build/gevent/deps/libev" && sh ./configure && cp config.h "$OLDPWD" ) > configure-output.txt' returned non-zero exit status 77
----------------------------------------
Cleaning up...
Removing temporary dir /Users/mc/.virtualenvs/mmbot/build...
Command /Users/mc/.virtualenvs/mmbot/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/mc/.virtualenvs/mmbot/build/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip-Nvp9pA-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mc/.virtualenvs/mmbot/bin/../include/site/python2.7 failed with error code 1 in /Users/mc/.virtualenvs/mmbot/build/gevent
Exception information:
Traceback (most recent call last):
File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/pip/req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /Users/mc/.virtualenvs/mmbot/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/mc/.virtualenvs/mmbot/build/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip-Nvp9pA-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mc/.virtualenvs/mmbot/bin/../include/site/python2.7 failed with error code 1 in /Users/mc/.virtualenvs/mmbot/build/gevent
Related
I am tring to install numpy with pip3, my environment:ubuntu(WSL), python3.8
pip3 install numpy
but I get this error
# pip3 install numpy
...
INFO: building library "npyrandom" sources
INFO: building extension "numpy.core._multiarray_tests" sources
INFO: building extension "numpy.core._multiarray_umath" sources
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-mx9wlqi4/numpy/setup.py", line 494, in <module>
setup_package()
File "/tmp/pip-build-mx9wlqi4/numpy/setup.py", line 486, in setup_package
setup(**metadata)
File "/tmp/pip-build-mx9wlqi4/numpy/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-build-mx9wlqi4/numpy/numpy/distutils/command/install.py", line 60, in run
r = self.setuptools_run()
File "/tmp/pip-build-mx9wlqi4/numpy/numpy/distutils/command/install.py", line 34, in setuptools_run
return distutils_install.run(self)
File "/usr/lib/python3.8/distutils/command/install.py", line 589, in run
self.run_command('build')
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-build-mx9wlqi4/numpy/numpy/distutils/command/build.py", line 62, in run
old_build.run(self)
File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-build-mx9wlqi4/numpy/numpy/distutils/command/build_src.py", line 144, in run
self.build_sources()
File "/tmp/pip-build-mx9wlqi4/numpy/numpy/distutils/command/build_src.py", line 161, in build_sources
self.build_extension_sources(ext)
File "/tmp/pip-build-mx9wlqi4/numpy/numpy/distutils/command/build_src.py", line 318, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "/tmp/pip-build-mx9wlqi4/numpy/numpy/distutils/command/build_src.py", line 378, in generate_sources
source = func(extension, build_dir)
File "/tmp/pip-build-mx9wlqi4/numpy/numpy/core/setup.py", line 507, in generate_config_h
moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
File "/tmp/pip-build-mx9wlqi4/numpy/numpy/core/setup.py", line 54, in check_types
out = check_types(*a, **kw)
File "/tmp/pip-build-mx9wlqi4/numpy/numpy/core/setup.py", line 351, in check_types
raise SystemError(
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mx9wlqi4/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-7vewheak-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-mx9wlqi4/numpy/
I am try to install python-dev|python-devel
# sudo apt-get install python-dev
# sudo apt-get install python-devel
(python-devel installation occoured another error:E: Unable to locate package python-devel, and I ignore it)
Then I try again to install numpy, error is as the same.
Collecting dlib
Using cached dlib-19.19.0.tar.gz (3.2 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'D:\anaconda\envs\env_dlib\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\setup.py'"'"'; file='"'"'C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\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\HP\AppData\Local\Temp\pip-wheel-sam_vsqz'
cwd: C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\
Complete output (53 lines):
running bdist_wheel
running build
running build_py
package init file 'dlib__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "D:\anaconda\envs\env_dlib\lib\subprocess.py", line 411, in check_output
**kwargs).stdout
File "D:\anaconda\envs\env_dlib\lib\subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "D:\anaconda\envs\env_dlib\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "D:\anaconda\envs\env_dlib\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\setup.py", line 261, in
'Topic :: Software Development',
File "D:\anaconda\envs\env_dlib\lib\site-packages\setuptools__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "D:\anaconda\envs\env_dlib\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "D:\anaconda\envs\env_dlib\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "D:\anaconda\envs\env_dlib\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\anaconda\envs\env_dlib\lib\site-packages\wheel\bdist_wheel.py", line 223, in run
self.run_command('build')
File "D:\anaconda\envs\env_dlib\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\anaconda\envs\env_dlib\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\anaconda\envs\env_dlib\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "D:\anaconda\envs\env_dlib\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\anaconda\envs\env_dlib\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\setup.py", line 125, in get_cmake_version
"\n*******************************************************************\n")
RuntimeError:
CMake must be installed to build the following extensions: dlib
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'D:\anaconda\envs\env_dlib\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\setup.py'"'"'; file='"'"'C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\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\HP\AppData\Local\Temp\pip-record-77ybyx6j\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\anaconda\envs\env_dlib\Include\dlib'
cwd: C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\
Complete output (55 lines):
running install
running build
running build_py
package init file 'dlib__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "D:\anaconda\envs\env_dlib\lib\subprocess.py", line 411, in check_output
**kwargs).stdout
File "D:\anaconda\envs\env_dlib\lib\subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "D:\anaconda\envs\env_dlib\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "D:\anaconda\envs\env_dlib\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\setup.py", line 261, in <module>
'Topic :: Software Development',
File "D:\anaconda\envs\env_dlib\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "D:\anaconda\envs\env_dlib\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "D:\anaconda\envs\env_dlib\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "D:\anaconda\envs\env_dlib\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\anaconda\envs\env_dlib\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "D:\anaconda\envs\env_dlib\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "D:\anaconda\envs\env_dlib\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\anaconda\envs\env_dlib\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\anaconda\envs\env_dlib\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "D:\anaconda\envs\env_dlib\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\anaconda\envs\env_dlib\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\setup.py", line 125, in get_cmake_version
"\n*******************************************************************\n")
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: dlib
*******************************************************************
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\anaconda\envs\env_dlib\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\setup.py'"'"'; file='"'"'C:\Users\HP\AppData\Local\Temp\pip-install-hlayhizn\dlib\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\HP\AppData\Local\Temp\pip-record-77ybyx6j\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\anaconda\envs\env_dlib\Include\dlib' Check the logs for full command output.
Run the following command in Anaconda Prompt.
easy_install dlib
-- Configuring incomplete, errors occurred!
See also "C:/Users/Jehad/AppData/Local/Temp/pip-build-uz9hgn/dlib/build/temp.win32-2.7/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Jehad/AppData/Local/Temp/pip-build-uz9hgn/dlib/build/temp.win32-2.7/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\jehad\appdata\local\temp\pip-build-uz9hgn\dlib\setup.py", line 238, in <module>
'Topic :: Software Development',
File "c:\python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "c:\python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "c:\python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\python27\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\python27\lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "c:\python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "c:\python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\python27\lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "c:\python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "c:\python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\users\jehad\appdata\local\temp\pip-build-uz9hgn\dlib\setup.py", line 119, in run
self.build_extension(ext)
File "c:\users\jehad\appdata\local\temp\pip-build-uz9hgn\dlib\setup.py", line 153, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\python27\lib\subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'c:\\users\\jehad\\appdata\\local\\temp\\pip-build-uz9hgn\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\\users\\jehad\\appdata\\local\\temp\\pip-build-uz9hgn\\dlib\\build\\lib.win32-2.7', '-DPYTHON_EXECUTABLE=c:\\python27\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\\users\\jehad\\appdata\\local\\temp\\pip-build-uz9hgn\\dlib\\build\\lib.win32-2.7']' returned non-zero exit status 1
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\jehad\\appdata\\local\\temp\\pip-build-uz9hgn\\dlib\\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\jehad\appdata\local\temp\pip-xb26oy-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\jehad\appdata\local\temp\pip-build-uz9hgn\dlib\
I have been trying to install dlib in my windows pc, but it showed it dint have cmake so after pip install cmake, it shows this error.
I am quite new to this, so like still trying to understand what this error means and how to fix it.
Install CMake using the installer from cmake.org. And make sure you tell the installer to put it into your path.
I get an error when running jedi:install-server which I don't know how to fix:
Running setup.py install for jediepcserver
Traceback (most recent call last):
File \"<string>\", line 1, in <module>
File \"/tmp/pip-MLAXK5-build/setup.py\", line 25, in <module>
**args
File \"/home/ehere/anaconda2/lib/python2.7/distutils/core.py\", line 151, in setup
dist.run_commands()
File \"/home/ehere/anaconda2/lib/python2.7/distutils/dist.py\", line 953, in run_commands
self.run_command(cmd)
File \"/home/ehere/anaconda2/lib/python2.7/distutils/dist.py\", line 972, in run_command
cmd_obj.run()
File \"/home/ehere/.emacs.d/.python-environments/default/lib/python2.7/site-packages/setuptools/command/install.py\", line 61, in run
return orig.install.run(self)
File \"/home/ehere/anaconda2/lib/python2.7/distutils/command/install.py\", line 575, in run
self.run_command(cmd_name)
File \"/home/ehere/anaconda2/lib/python2.7/distutils/cmd.py\", line 326, in run_command
self.distribution.run_command(command)
File \"/home/ehere/anaconda2/lib/python2.7/distutils/dist.py\", line 971, in run_command
cmd_obj.ensure_finalized()
File \"/home/ehere/anaconda2/lib/python2.7/distutils/cmd.py\", line 109, in ensure_finalized
self.finalize_options()
File \"/home/ehere/.emacs.d/.python-environments/default/lib/python2.7/site-packages/setuptools/command/install_lib.py\", line 16, in finalize_options
self.set_undefined_options('install',('install_layout','install_layout'))
File \"/home/ehere/anaconda2/lib/python2.7/distutils/cmd.py\", line 302, in set_undefined_options
getattr(src_cmd_obj, src_option))
File \"/home/ehere/anaconda2/lib/python2.7/distutils/cmd.py\", line 105, in __getattr__
raise AttributeError, attr
AttributeError: install_layout
Complete output from command /home/ehere/.emacs.d/.python-environments/default/bin/python2 -c \"import setuptools, tokenize;__file__='/tmp/pip-MLAXK5-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record /tmp/pip-uD7aIs-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ehere/.emacs.d/.python-environments/default/include/site/python2.7:
running install
Strangly I can install jediepcserver manually using pip -U /path/to/jedi-core/, but somehow when running it from inside emacs it does not work. Anyone has a clue what is going on here?
I have been beating my head against a wall on this for 2+ days and am making no progress.
I am trying to install the Python MySQL connectors on my Windows 8 (hate Windows 8) box.
I am using Python 2.7. I originally received an error:
vcvarsall.bat is not found.
I did some research and found that I needed VS 2008 (VC++ compiler) installed on my box and I installed the express version. I also added ProductDir value with the path to vcvarsall.bat to the following key in my registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VC.
I also added the VS90COMNTOOLS environment variable with the path to vcvarsall.bat. I am still getting an error when I run the following:
pip install MySQL-python
Any input you can provide is most appreciated... Thanks...
The error is listed in the following snippet from the pip.log:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\t\appdata\local\temp\pip_build_T\MySQL-python\setup.py", line 21, in <module>
setuptools.setup(**metadata)
File "C:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "build\bdist.win-amd64\egg\setuptools\command\install.py", line 53, in run
File "C:\Python27\lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "build\bdist.win-amd64\egg\setuptools\command\build_ext.py", line 52, in run
File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run
self.build_extensions()
File "C:\Python27\lib\distutils\command\build_ext.py", line 446, in build_extensions
self.build_extension(ext)
File "build\bdist.win-amd64\egg\setuptools\command\build_ext.py", line 186, in build_extension
File "C:\Python27\lib\distutils\command\build_ext.py", line 496, in build_extension
depends=ext.depends)
File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
self.initialize()
File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: [u'path']
----------------------------------------
Cleaning up...
Removing temporary dir c:\users\t\appdata\local\temp\pip_build_T...
Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\t\\appdata\\local\\temp\\pip_build_T\\MySQL-python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\t\appdata\local\temp\pip-d5hmns-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\t\appdata\local\temp\pip_build_T\MySQL-python
Exception information:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip-1.5.4-py2.7.egg\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip-1.5.4-py2.7.egg\pip\commands\install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\Python27\lib\site-packages\pip-1.5.4-py2.7.egg\pip\req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "C:\Python27\lib\site-packages\pip-1.5.4-py2.7.egg\pip\req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "C:\Python27\lib\site-packages\pip-1.5.4-py2.7.egg\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\t\\appdata\\local\\temp\\pip_build_T\\MySQL-python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\t\appdata\local\temp\pip-d5hmns-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\t\appdata\local\temp\pip_build_T\MySQL-python
The pip install failure suggests there is some underlying dependency on compiled files. An alternative would be to use the .exe installer from https://pypi.python.org/pypi/MySQL-python - but this isn't suitable for virtualenvs, and will fail for 64-bit Python (it will complain that it can't find Python 2.7 in the registry even though it is installed).
Luckily, Christoph Gohlke maintains some unofficial Windows binaries which are pip-installable. You can find them at at http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
You can now call pip install C:/PATH/TO/MySQL_python‑1.2.5‑cp27‑none‑win_amd64.whl from your main Python environment, or a virtualenv.
Ideally, wheels like these will be made available via the MySQL-python PyPI page, at which point a simple pip install will work.
(This answer is based on Carsten's helpful comments.)