How to solve error installing jupyter notebook? - python

I am trying to install jupyter notebook in my local.
If I run pip install jupyterlab I get the following output.
Using cached jupyterlab-3.4.3-py3-none-any.whl (8.8 MB)
Collecting jupyterlab-server~=2.10
Using cached jupyterlab_server-2.14.0-py3-none-any.whl (54 kB)
Collecting nbclassic~=0.2
Using cached nbclassic-0.3.7-py3-none-any.whl (13 kB)
Collecting jinja2>=2.1
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting jupyter-server~=1.16
Using cached jupyter_server-1.18.0-py3-none-any.whl (344 kB)
Collecting ipython
Using cached ipython-8.4.0-py3-none-any.whl (750 kB)
Collecting jupyter-core
Using cached jupyter_core-4.10.0-py3-none-any.whl (87 kB)
Collecting tornado>=6.1.0
Using cached tornado-6.1.tar.gz (497 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: packaging in c:\msys64\mingw64\lib\python3.9\site-packages (from jupyterlab) (21.3)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.1.1.tar.gz (18 kB)
Preparing metadata (setup.py) ... done
Collecting prometheus-client
Using cached prometheus_client-0.14.1-py3-none-any.whl (59 kB)
Collecting traitlets>=5.1
Using cached traitlets-5.3.0-py3-none-any.whl (106 kB)
Collecting websocket-client
Using cached websocket_client-1.3.3-py3-none-any.whl (54 kB)
Collecting pywinpty
Using cached pywinpty-2.0.5.tar.gz (23 kB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [63 lines of output]
Collecting maturin<0.13,>=0.12.6
Using cached maturin-0.12.20.tar.gz (156 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
[40 lines of output]
Traceback (most recent call last):
File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 363, in <module>
main()
File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 124, in get_requires_for_build_wheel backend = _build_backend()
File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 89, in _build_backend
obj = import_module(mod_path)
File "C:\msys64\mingw64\lib\python3.9\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\__init__.py", line 241, in <module>
monkey.patch_all()
File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 99, in patch_all
patch_for_msvc_specialized_compiler()
File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 162, in patch_for_msvc_specialized_compiler
patch_func(*msvc9('find_vcvarsall'))
File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 149, in patch_params
mod = import_module(mod_name)
File "C:\msys64\mingw64\lib\python3.9\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\_distutils\msvc9compiler.py", line 295, in <module>
raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I already tried pip install wheel and the result is that it is already installed.
Requirement already satisfied: wheel in c:\msys64\mingw64\lib\python3.9\site-packages (0.37.1)
I already tried uninstalling and reinstalling python entirely.
A few things to notice:
I am trying to do this on windows
I do have WSL installed and enabled (idk if that is causing some noise)

See this link. Apparently the GTK is this issue consider switching, or uninstalling setuptools (pip). And use pacman.
msys2/mingw64: pip: VC 6.0 is not supported by this module

Related

Problem with installing dlib python 3.9.6

PS C:\Deepankar\Projects\VaibhavBhaiya-IntruderDetection\PHASE-II> pip install face recognition
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting face
Downloading face-22.0.0-py3-none-any.whl (54 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 kB 177.1 kB/s eta 0:00:00
ERROR: Could not find a version that satisfies the requirement recognition (from versions: none)
ERROR: No matching distribution found for recognition
[notice] A new release of pip is available: 23.0 -> 23.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip
PS C:\Deepankar\Projects\VaibhavBhaiya-IntruderDetection\PHASE-II> python.exe -m pip install --upgrade pip
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Requirement already satisfied: pip in c:\users\deepa\appdata\local\programs\python\python39\lib\site-packages (23.0)
Collecting pip
Downloading pip-23.0.1-py3-none-any.whl (2.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 1.2 MB/s eta 0:00:00
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 23.0
Uninstalling pip-23.0:
Successfully uninstalled pip-23.0
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\Users\deepa\AppData\Local\Temp\pip-uninstall-1kkyucgz\pip.exe'
Consider using the --user option or check the permissions.
PS C:\Deepankar\Projects\VaibhavBhaiya-IntruderDetection\PHASE-II> python.exe -m pip install --user --upgrade pip
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Requirement already satisfied: pip in c:\users\deepa\appdata\local\programs\python\python39\lib\site-packages (23.0.1)
PS C:\Deepankar\Projects\VaibhavBhaiya-IntruderDetection\PHASE-II> pip install dlib
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting dlib
Downloading dlib-19.24.0.tar.gz (3.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 103.2 kB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [68 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py:129: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(cmake_version) < '3.1.0':
Building extension for Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\build\lib.win-amd64-cpython-39 -DPYTHON_EXECUTABLE=C:\Users\deepa\AppData\Local\Programs\Python\Python39\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\build\lib.win-amd64-cpython-39 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py", line 222, in <module>
setup(
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\wheel\bdist_wheel.py", line 325, in run
self.run_command("build")
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
self.run_command(cmd_name)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-hakhwrt8\\dlib_d175b3b197704551a11d650b52da49e5\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-hakhwrt8\\dlib_d175b3b197704551a11d650b52da49e5\\build\\lib.win-amd64-cpython-39', '-DPYTHON_EXECUTABLE=C:\\Users\\deepa\\AppData\\Local\\Programs\\Python\\Python39\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-hakhwrt8\\dlib_d175b3b197704551a11d650b52da49e5\\build\\lib.win-amd64-cpython-39', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
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: subprocess-exited-with-error
× Running setup.py install for dlib did not run successfully.
│ exit code: 1
╰─> [72 lines of output]
running install
C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
running build_ext
C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py:129: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(cmake_version) < '3.1.0':
Building extension for Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\build\lib.win-amd64-cpython-39 -DPYTHON_EXECUTABLE=C:\Users\deepa\AppData\Local\Programs\Python\Python39\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\build\lib.win-amd64-cpython-39 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py", line 222, in <module>
setup(
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install.py", line 68, in run
return orig.install.run(self)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\command\install.py", line 698, in run
self.run_command('build')
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
self.run_command(cmd_name)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-hakhwrt8\\dlib_d175b3b197704551a11d650b52da49e5\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-hakhwrt8\\dlib_d175b3b197704551a11d650b52da49e5\\build\\lib.win-amd64-cpython-39', '-DPYTHON_EXECUTABLE=C:\\Users\\deepa\\AppData\\Local\\Programs\\Python\\Python39\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-hakhwrt8\\dlib_d175b3b197704551a11d650b52da49e5\\build\\lib.win-amd64-cpython-39', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> dlib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
PS C:\Deepankar\Projects\VaibhavBhaiya-IntruderDetection\PHASE-II> pip install face-recognition
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting face-recognition
Downloading face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)
Requirement already satisfied: numpy in c:\users\deepa\appdata\roaming\python\python39\site-packages (from face-recognition) (1.22.2)
Requirement already satisfied: Click>=6.0 in c:\users\deepa\appdata\roaming\python\python39\site-packages (from face-recognition) (8.0.4)
Requirement already satisfied: Pillow in c:\users\deepa\appdata\roaming\python\python39\site-packages (from face-recognition) (9.0.1)
Collecting dlib>=19.7
Downloading dlib-19.24.0.tar.gz (3.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 160.1 kB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\deepa\appdata\local\programs\python\python39\lib\site-packages (from face-recognition) (0.3.0)
Requirement already satisfied: colorama in c:\users\deepa\appdata\roaming\python\python39\site-packages (from Click>=6.0->face-recognition) (0.4.4)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [68 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\setup.py:129: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(cmake_version) < '3.1.0':
Building extension for Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\build\lib.win-amd64-cpython-39 -DPYTHON_EXECUTABLE=C:\Users\deepa\AppData\Local\Programs\Python\Python39\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\build\lib.win-amd64-cpython-39 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\setup.py", line 222, in <module>
setup(
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\wheel\bdist_wheel.py", line 325, in run
self.run_command("build")
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
self.run_command(cmd_name)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-fv7x7lx3\\dlib_b7cc73b6dfd4410ea3e6b763453889d8\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-fv7x7lx3\\dlib_b7cc73b6dfd4410ea3e6b763453889d8\\build\\lib.win-amd64-cpython-39', '-DPYTHON_EXECUTABLE=C:\\Users\\deepa\\AppData\\Local\\Programs\\Python\\Python39\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-fv7x7lx3\\dlib_b7cc73b6dfd4410ea3e6b763453889d8\\build\\lib.win-amd64-cpython-39', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib, face-recognition
Running setup.py install for dlib ... error
error: subprocess-exited-with-error
× Running setup.py install for dlib did not run successfully.
│ exit code: 1
╰─> [72 lines of output]
running install
C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
running build_ext
C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\setup.py:129: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(cmake_version) < '3.1.0':
Building extension for Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\build\lib.win-amd64-cpython-39 -DPYTHON_EXECUTABLE=C:\Users\deepa\AppData\Local\Programs\Python\Python39\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\build\lib.win-amd64-cpython-39 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\setup.py", line 222, in <module>
setup(
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install.py", line 68, in run
return orig.install.run(self)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\command\install.py", line 698, in run
self.run_command('build')
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
self.run_command(cmd_name)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\deepa\AppData\Local\Temp\pip-install-fv7x7lx3\dlib_b7cc73b6dfd4410ea3e6b763453889d8\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-fv7x7lx3\\dlib_b7cc73b6dfd4410ea3e6b763453889d8\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-fv7x7lx3\\dlib_b7cc73b6dfd4410ea3e6b763453889d8\\build\\lib.win-amd64-cpython-39', '-DPYTHON_EXECUTABLE=C:\\Users\\deepa\\AppData\\Local\\Programs\\Python\\Python39\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-fv7x7lx3\\dlib_b7cc73b6dfd4410ea3e6b763453889d8\\build\\lib.win-amd64-cpython-39', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> dlib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Trying to install face-recognition

I am having trouble installing PyDictionary

When I type "pip install PyDictionary" I reserve this error. I also tryed installing the package by typing "python(3) -m pip install PyDictionary" I installed this package before without problems with (python 3.10) but not o n python 3.10.64
enter code here
PS C:\Users\danie\Desktop\pythonProject> pip install PyDictionary
Collecting PyDictionary
Using cached PyDictionary-2.0.1-py3-none-any.whl (6.1 kB)
Collecting goslate
Using cached goslate-1.5.2-py3-none-any.whl
Requirement already satisfied: requests in c:\users\danie\appdata\local\programs\python\python310\lib\site-packages (from PyDictionary) (2.27.1)
Requirement already satisfied: click in c:\users\danie\appdata\local\programs\python\python310\lib\site-packages (from PyDictionary) (8.0.4)
Collecting bs4
Using cached bs4-0.0.1-py3-none-any.whl
Requirement already satisfied: beautifulsoup4 in c:\users\danie\appdata\local\programs\python\python310\lib\site-packages (from bs4->PyDictionary) (4.10.0)
Requirement already satisfied: colorama in c:\users\danie\appdata\local\programs\python\python310\lib\site-packages (from click->PyDictionary) (0.4.4)
Collecting futures
Using cached futures-3.0.5.tar.gz (25 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 14, in <module>
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 18, in <module>
from setuptools.dist import Distribution
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 32, in <module>
from setuptools.extern.more_itertools import unique_everseen
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 674, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\extern\__init__.py", line 52, in create_module
return self.load_module(spec.name)
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\extern\__init__.py", line 37, in load_module
__import__(extant)
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_vendor\more_itertools\__init__.py", line 1, in <module>
from .more import * # noqa
File "C:\Users\danie\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_vendor\more_itertools\more.py", line 5, in <module>
from concurrent.futures import ThreadPoolExecutor
File "C:\Users\danie\AppData\Local\Temp\pip-install-cvmk7t7g\futures_bc0e05fe70bf443a80089b769091bce8\concurrent\futures\__init__.py", line 8, in <module>
from concurrent.futures._base import (FIRST_COMPLETED,
File "C:\Users\danie\AppData\Local\Temp\pip-install-cvmk7t7g\futures_bc0e05fe70bf443a80089b769091bce8\concurrent\futures\_base.py", line 357
raise type(self._exception), self._exception, self._traceback
^
SyntaxError: invalid syntax
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
There's an open issue on the repo currently: I'll attach the link here but give a quick explanation.
https://github.com/geekpradd/PyDictionary/issues/52
There's a dependency for the google translate aspect of the package that depends on Python 2 code. That's causing the package to fail to install on Python 3.10+ (In the dependency repo they explicitly declare that it won't work on Python 3+).
One of the answerers on the github issue said he found a workaround by installing futures before attempting to install PyDictionary

pip fails with python3.10 & python3.11

I have python 3.8 & 3.9 and 3.10 and 3.11 installed, however pip install does not work for 3.10 and 3.11 and only works for the rest simply please observe:
pip3 install jedi
returns:
Requirement already satisfied: jedi in /home/user/.local/lib/python3.8/site-packages (0.17.2)
Requirement already satisfied: parso<0.8.0,>=0.7.0 in /home/user/.local/lib/python3.8/site-packages (from jedi) (0.7.1)
so does:
pip install jedi
returns
Requirement already satisfied: jedi in /home/user/.local/lib/python3.8/site-packages (0.17.2)
Requirement already satisfied: parso<0.8.0,>=0.7.0 in /home/user/.local/lib/python3.8/site-packages (from jedi) (0.7.1)
as well as :
python3.8 -m pip install jedi
results in:
Requirement already satisfied: jedi in /home/c/.local/lib/python3.8/site-packages (0.17.2)
Requirement already satisfied: parso<0.8.0,>=0.7.0 in /home/c/.local/lib/python3.8/site-packages (from jedi) (0.7.1)
However
python3.10 -m pip install jedi
results in :
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/lib/python3/dist-packages/pip/__main__.py", line 19, in <module>
sys.exit(_main())
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/usr/lib/python3/dist-packages/pip/_internal/commands/__init__.py", line 96, in create_command
module = importlib.import_module(module_path)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 24, in <module>
from pip._internal.cli.req_command import RequirementCommand
File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 15, in <module>
from pip._internal.index.package_finder import PackageFinder
File "/usr/lib/python3/dist-packages/pip/_internal/index/package_finder.py", line 21, in <module>
from pip._internal.index.collector import parse_links
File "/usr/lib/python3/dist-packages/pip/_internal/index/collector.py", line 12, in <module>
from pip._vendor import html5lib, requests
ImportError: cannot import name 'html5lib' from 'pip._vendor' (/usr/lib/python3/dist-packages/pip/_vendor/__init__.py)
Python versions are managed by alternatives
update-alternatives --query python
which returns:
Name: python
Link: /usr/bin/python
Status: auto
Best: /usr/bin/python3.8
Value: /usr/bin/python3.8
Alternative: /usr/bin/python3.8
Priority: 80
and
update-alternatives --query python3
returns:
Name: python3
Link: /usr/bin/python3
Status: auto
Best: /usr/bin/python3.8
Value: /usr/bin/python3.8
Alternative: /usr/bin/python3.10
Priority: 40
Alternative: /usr/bin/python3.8
Priority: 90
I tried re-installing practically everything including python versions and the modules to no avail.
I am not too sure what is the root of the problem or actually what is the process that leads here, it only does
It's always best to run the pip as a main module with the version of Python you want to install for.
python3.9 -m pip install ...
python3.10 -m pip install ...
python3.11 -m pip install ...
If you want to force an upgrade, use the --upgrade option.
First try to install pygames
PS > py -m pip install pygames
ERROR: Could not find a version that satisfies the requirement
pygames (from versions: none)
ERROR: No matching distribution found for pygames
There is a version conflict. I have many Python versions (2.4 - 3.11) on Windows 11.
py laucher defaults to highest Python version installed.
=> specify py launcher option -xx.yy-ZZ like:
(More info: py --help)
PS > py -3.7-32 -m pip install -U pygame
Collecting pygame
Downloading pygame-2.1.2-cp37-cp37m-win32.whl (8.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8.1/8.1 MB 1.2 MB/s
Installing collected packages: pygame
Successfully installed pygame-2.1.2
PS > py -3.7-32
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
'>>> from pygame import *'
'>>>'
Happy end!

ModuleNotFoundError: No module named 'jinja2' during deployment of django project on heroku

Well Here I am trying to deploy my first django app and getting error :ModuleNotFoundError: No module named 'jinja2'. I don't know where jinja came from. In my requirement file there is no jinja. Tell me if you know how to fix it. I shall be very thankful to you.
trackback:
remote: -----> $ python manage.py collectstatic --noinput
remote: Traceback (most recent call last):
remote: File "manage.py", line 21, in <module>
remote: main()
remote: File "manage.py", line 17, in main
remote: execute_from_command_line(sys.argv)
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
remote: utility.execute()
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
remote: django.setup()
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
remote: apps.populate(settings.INSTALLED_APPS)
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
remote: app_config = AppConfig.create(entry)
remote: File "/app/.heroku/python/lib/python3.8/site-packages/django/apps/config.py", line 90, in create
remote: module = import_module(entry)
remote: File "/app/.heroku/python/lib/python3.8/importlib/__init__.py", line 127, in import_module
remote: return _bootstrap._gcd_import(name[level:], package, level)
remote: File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
remote: File "<frozen importlib._bootstrap>", line 991, in _find_and_load
remote: File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
remote: File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
remote: File "<frozen importlib._bootstrap_external>", line 783, in exec_module
remote: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
remote: File "/app/.heroku/python/lib/python3.8/site-packages/knox/__init__.py", line 2, in <module>
remote: from . import cli # noqa: F401
remote: File "/app/.heroku/python/lib/python3.8/site-packages/knox/cli.py", line 25, in <module>
remote: from .certificate import Cert # noqa: F401
remote: File "/app/.heroku/python/lib/python3.8/site-packages/knox/certificate/__init__.py", line 17, in <module>
remote: from .cert import Cert # noqa: F401
remote: File "/app/.heroku/python/lib/python3.8/site-packages/knox/certificate/cert.py", line 32, in <module>
remote: from jinja2 import Environment
remote: ModuleNotFoundError: No module named 'jinja2'
remote:
remote: ! Error while running '$ python manage.py collectstatic --noinput'.
remote: See traceback above for details.
remote:
remote: You may need to update application code to resolve this error.
remote: Or, you can disable collectstatic for this application:
remote:
remote: $ heroku config:set DISABLE_COLLECTSTATIC=1
remote:
remote: https://devcenter.heroku.com/articles/django-assets
remote:
remote: ****** Collectstatic environment variables:
remote:
remote: PYTHONUNBUFFERED=1
remote: LD_LIBRARY_PATH=/app/.heroku/vendor/lib:/app/.heroku/python/lib:
remote: BPLOG_PREFIX=buildpack.python
remote: LANG=en_US.UTF-8
remote: STACK=heroku-18
remote: OLDPWD=/tmp/codon/tmp/buildpacks/0f40890b54a617ec2334fac0439a123c6a0c1136
remote: C_INCLUDE_PATH=/app/.heroku/vendor/include:/app/.heroku/python/include:
remote: DYNO=run.8821
remote: REQUEST_ID=59234ede-f580-ca06-2732-8ea4a1bd4a99
remote: SOURCE_VERSION=20b61f6afb127dcb2ca25e8d46b2c3427f15a637
remote: PWD=/tmp/build_d827bdd8
remote: HOME=/app
remote: PROFILE_PATH=/tmp/build_d827bdd8/.profile.d/python.sh
remote: DEBUG_COLLECTSTATIC=1
remote: LIBRARY_PATH=/app/.heroku/vendor/lib:/app/.heroku/python/lib:
remote: CACHE_DIR=/tmp/codon/tmp/cache
remote: EXPORT_PATH=/tmp/codon/tmp/buildpacks/0f40890b54a617ec2334fac0439a123c6a0c1136/bin/../export
remote: BIN_DIR=/tmp/codon/tmp/buildpacks/0f40890b54a617ec2334fac0439a123c6a0c1136/bin
remote: SHLVL=3
remote: PYTHONPATH=.
remote: CPLUS_INCLUDE_PATH=/app/.heroku/vendor/include:/app/.heroku/python/include:
remote: BUILDPACK_LOG_FILE=/dev/fd/3
remote: PATH=/app/.heroku/python/bin:/app/.heroku/vendor/bin::/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/tmp/codon/tmp/buildpacks/0f40890b54a617ec2334fac0439a123c6a0c1136/vendor/
remote: ENV_DIR=/tmp/d20201215-58-1fz9etp
remote: BUILD_DIR=/tmp/build_d827bdd8
remote: PKG_CONFIG_PATH=/app/.heroku/vendor/lib/pkg-config:/app/.heroku/python/lib/pkg-config:
remote: PIP_NO_PYTHON_VERSION_WARNING=1
remote: _=/usr/bin/env
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to restlearnsignup.
remote:
To https://git.heroku.com/restlearnsignup.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/restlearnsignup.git'
requirment.txt
asgiref==3.3.1
astroid==2.4.1
certifi==2020.12.5
cffi==1.14.4
chardet==3.0.4
click==7.1.2
colorama==0.4.3
cryptography==3.3.1
decorator==4.4.2
Django==3.0.3
django-rest-knox==4.1.0
djangorestframework==3.12.2
dodgy==0.2.1
dynaconf==3.1.2
flake8==3.8.3
flake8-polyfill==1.0.2
gender-guesser==0.4.0
gunicorn==20.0.4
hvac==0.10.5
idna==2.10
isort==4.3.21
knox==0.1.11
lazy-object-proxy==1.4.3
loguru==0.5.3
mccabe==0.6.1
pep8-naming==0.10.0
prospector==1.3.0
pycodestyle==2.6.0
pycparser==2.20
pydocstyle==5.0.2
pyflakes==2.2.0
pylint==2.5.2
pylint-celery==0.3
pylint-django==2.0.15
pylint-flask==0.6
pylint-plugin-utils==0.6
pytz == 2020.4
PyYAML==5.3.1
requests==2.25.0
requirements-detector==0.7
setoptconf==0.2.0
shortuuid==1.0.1
six==1.15.0
snowballstemmer==2.0.0
sqlparse == 0.4.1
toml==0.10.1
tqdm==v4.54.1
urllib3==1.26.2
validators==0.18.1
whitenoise==5.2.0
win32-setctime==1.0.3
wincertstore==0.2
wrapt==1.12.1
if more details are require then tell me in a comment . I will update my question with that information.
Based on the traceback and the requirements.txt of the knox project [GitHub], knox needs Jinja, indeed:
cryptography==2.9.2
Jinja2==2.11.2
setuptools==46.1.3
You thus should add Jinja2 to the requirements.txt.

how to install "pip install rasa", I am getting error

I am getting the below error while i am trying for "pip install rasa". My Python Version is 3.7.8.
Error message :
Requirement already satisfied: python-dateutil<2.9,>=2.8 in c:\users\loginname\desktop\2020\chatbot\venv\lib\site-packages (from rasa) (2.8.1)
Collecting colorhash<1.1.0,>=1.0.2
Using cached colorhash-1.0.2-py2.py3-none-any.whl (6.0 kB)
Collecting ujson<3.0,>=1.35
Using cached ujson-2.0.3.tar.gz (7.1 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\loginname\desktop\2020\chatbot\venv\scripts\python.exe' 'c:\users\loginname\desktop\2020\chatbot\venv\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\loginname\AppData\Local\Temp\pip-build-env-nir8n2vw\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (42 lines):
Traceback (most recent call last):
File "C:\Users\loginname\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\loginname\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\users\loginname\desktop\2020\chatbot\venv\lib\site-packages\pip\__main__.py", line 26, in <module>
sys.exit(_main())
File "c:\users\loginname\desktop\2020\chatbot\venv\lib\site-packages\pip\_internal\cli\main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "c:\users\loginname\desktop\2020\chatbot\venv\lib\site-packages\pip\_internal\commands\__init__.py", line 104, in create_command
module = importlib.import_module(module_path)
File "C:\Users\loginname\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
$ sudo apt install python3-dev python3-pip
$ python3 -m venv ./venv
$ source ./venv/bin/activate
$ pip install -U pip
$ pip install rasa
https://rasa.com/docs/rasa/user-guide/installation/

Categories

Resources