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.
Related
Xfoil Manual Setup Through setup.py raise "CMake Error: Error: generator : MinGW Makefiles"
I have downloaded the python XFOIL library and made some modifications to the API, which is written in Fortran f90, in order to get the thickness attribute, which is calculated in the XFOIL fortran library but not transferred to python through the API, as follows:
function get_thickness() bind(c, name='get_thickness')
use m_xgeom, only: THICK
integer(c_float) :: get_thickness
get_thickness = THICK
end function get_thickness
Since I've made this modification, I have to make the installation manually rather than using pip install.
I tried:
$RepoPath\xfoil-python-master>python setup.py install
But when I try to make the installation with python setup.py install, I get the following error:
running install
$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build, pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\command\easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
EasyInstallDeprecationWarning,
running bdist_egg
running egg_info
writing xfoil.egg-info\PKG-INFO
writing dependency_links to xfoil.egg-info\dependency_links.txt
writing requirements to xfoil.egg-info\requires.txt
writing top-level names to xfoil.egg-info\top_level.txt
reading manifest file 'xfoil.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'xfoil.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=$RepoPath\\\xfoil-python-master\\build\\lib.win-amd64-cpython-37\\xfoil', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build\\temp.win-amd64-cpython-37\\Release', '-DPYTHON_EXECUTABLE=C:\\Users\\kandemir\\Anaconda3\\envs\\py37\\python.exe', '-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE', '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=$RepoPath\\\xfoil-python-master\\build\\lib.win-amd64-cpython-37\\xfoil', '-G', 'MinGW Makefiles']
CMake Error: Error: generator : MinGW Makefiles
Does not match the generator used previously: NMake Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
Traceback (most recent call last):
File "setup.py", line 149, in <module>
zip_safe=False
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
self.run_command(cmd)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
cmd_obj.run()
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\command\install.py", line 74, in run
self.do_egg_install()
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\command\install.py", line 123, in do_egg_install
self.run_command('bdist_egg')
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
cmd_obj.run()
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\command\bdist_egg.py", line 165, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\command\bdist_egg.py", line 151, in call_command
self.run_command(cmdname)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
cmd_obj.run()
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\command\install_lib.py", line 112, in build
self.run_command('build_ext')
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
cmd_obj.run()
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
_build_ext.run(self)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "$UserPath\Anaconda3\envs\py37\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
self.build_extensions()
File "setup.py", line 110, in build_extensions
cwd=self.build_temp)
File "$UserPath\Anaconda3\envs\py37\lib\subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '$RepoPath\\\xfoil-python-master', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=$RepoPath\\\xfoil-python-master\\build\\lib.win-amd64-cpython-37\\xfoil', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build\\temp.win-amd64-cpython-37\\Release', '-DPYTHON_EXECUTABLE=C:\\Users\\kandemir\\Anaconda3\\envs\\py37\\python.exe', '-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE', '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=$RepoPath\\\xfoil-python-master\\build\\lib.win-amd64-cpython-37\\xfoil', '-G', 'MinGW Makefiles']' returned non-zero exit status 1.
Could you please help me to find the solution to that?
To build a project managed with poetry I need to build an f2py extension first. I am trying to achieve it with a separate build.py file inspired by this answer. For now my setup.py is:
# In case of numpy, build_ext is a module containing class build_ext
from numpy.distutils.core import Extension, build_ext
ext = Extension(
'ext_name',
sources=[<list_of_fortran_sources>],
)
def build(setup_kwargs):
setup_kwargs.update(
{"ext_modules": [ext], "cmdclass": {"build_ext": build_ext.build_ext}}
)
But trying to build it I am getting an error:
>>> poetry build
A setup.py file already exists. Using it.
running build
running build_py
running build_ext
Traceback (most recent call last):
File "/home/lap1dem/dev-python/iricore/setup.py", line 37, in <module>
setup(**setup_kwargs)
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 136, in run
self.run_command(cmd_name)
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
super().run_command(command)
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 985, in run_command
cmd_obj.ensure_finalized()
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/numpy/distutils/command/build_ext.py", line 86, in finalize_options
self.set_undefined_options('build',
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 290, in set_undefined_options
setattr(self, dst_option, getattr(src_cmd_obj, src_option))
File "/home/lap1dem/.cache/pypoetry/virtualenvs/iricore-iDxR-q1V-py3.8/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 103, in __getattr__
raise AttributeError(attr)
AttributeError: warn_error
I have looked into build_ext.py source file, seems like this class is trying to set undefined options, like warn_error, cpu_baseline, cpu_dispatch, etc. in addition to built-in ditutils.command.build_ext. Those additional options should be initialized with the build_ext.initialize_options(), but build_ext.set_undefined_options() fails to find them. It is not clear to me how I can fix it. Am I even on the right track to build the f2py extension?
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!
i was trying to install face_recognition on spyder and i have to install cnmake and dlib first so while installing dlib i came across this error.
i tried following this site to install dlib but i got stuck
https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf
this is what they show on command prompt
C:\Users\L30809\Desktop\dlib-master>python setup.py install
running install
running bdist_egg
running egg_info
writing dlib.egg-info\PKG-INFO
writing dependency_links to dlib.egg-info\dependency_links.txt
writing top-level names to dlib.egg-info\top_level.txt
package init file 'dlib\__init__.py' not found (or not a regular file)
reading manifest file 'dlib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'tools\python\build*'
writing manifest file 'dlib.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
Traceback (most recent call last):
File "setup.py", line 261, in <module>
'Topic :: Software Development',
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\ProgramData\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\install.py", line 67, in run
self.do_egg_install()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "C:\ProgramData\Anaconda3\lib\distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "setup.py", line 126, in get_cmake_version
return re.search(r'version\s*([\d.]+)', out.decode()).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
and this is what they show on spyder
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib, face-recognition
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
Complete output from command C:\ProgramData\Anaconda3\pythonw.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\L30809\\AppData\\Local\\Temp\\pip-install-o0volf3j\\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\L30809\AppData\Local\Temp\pip-record-spg4otqt\install-record.txt --single-version-externally-managed --compile:
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 "<string>", line 1, in <module>
File "C:\Users\L30809\AppData\Local\Temp\pip-install-o0volf3j\dlib\setup.py", line 261, in <module>
'Topic :: Software Development',
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\ProgramData\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\ProgramData\Anaconda3\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\ProgramData\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\L30809\AppData\Local\Temp\pip-install-o0volf3j\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\L30809\AppData\Local\Temp\pip-install-o0volf3j\dlib\setup.py", line 126, in get_cmake_version
return re.search(r'version\s*([\d.]+)', out.decode()).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
----------------------------------------
Note: you may need to restart the kernel to use updated packages.
Failed building wheel for dlib
Command "C:\ProgramData\Anaconda3\pythonw.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\L30809\\AppData\\Local\\Temp\\pip-install-
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.