Buildroot - installing of the "pytest-runner" package fails - pypi

Buildroot version: 2017-02
I need to integrate python package 'chardet' to my build. The chardet require the 'pytest-runner'package.
Case 1
The 'chardet' is marked to be integrated into build. The 'pytest-runner' is not pre-feteched and the 'chardet' package updated to the latest version (3.0.3) before the build with the scanpypi script. When the make is run the following error message is shown indicating problems with the 'pytest-runner':
>>> python-chardet 3.0.3 Building
(cd /home/nnnn/bldr_lab/buildroot/output/build/python-chardet-3.0.3//;
PATH="/home/nnnn/bldr_lab/buildroot/output/host/bin:/home/nnnn/bldr_lab
/buildroot/output/host/sbin:/home/nnnn/bldr_lab/buildroot/output/host/usr
/bin:/home/nnnn/bldr_lab/buildroot/output/host/usr/sbin:/home/nnnn/x-tools
/arm-cortex_a8-linux-gnueabihf/bin:/home/nnnn/bin:/home/nnnn/.local
/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr
/games:/usr/local/games" PYTHONPATH="/home/nnnn/bldr_lab/buildroot/output
/target/usr/lib/python2.7/sysconfigdata/:/home/nnnn/bldr_lab/buildroot
/output/target/usr/lib/python2.7/site-packages/" _python_sysroot=/home
/nnnn/bldr_lab/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf
/sysroot _python_prefix=/usr _python_exec_prefix=/usr /home/nnnn/bldr_lab
/buildroot/output/host/usr/bin/python setup.py build )
Download error on https://pypi.python.org/simple/pytest-runner/: unknown
url type: https -- Some packages may not be found!
Couldn't find index page for 'pytest-runner' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: unknown url type: https
-- Some packages may not be found!
No local packages or download links found for pytest-runner
Traceback (most recent call last):
File "setup.py", line 52, in <module>
['chardetect = chardet.cli.chardetect:main']})
File "/home/nnnn/bldr_lab/buildroot/output/host/usr/lib/python2.7
/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 268, in
__init__
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 313, in
fetch_build_eggs
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 846, in resolve
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1091, in best_match
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1103, in obtain
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 380, in fetch_build_egg
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 633, in easy_install
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner')
package/pkg-generic.mk:216: recipe for target '/home/nnnn/bldr_lab
/buildroot/output/build/python-chardet-3.0.3/.stamp_built' failed
make[1]: *** [/home/nnnn/bldr_lab/buildroot/output/build/python-chardet-
3.0.3/.stamp_built] Error 1
Makefile:79: recipe for target '_all' failed
make: *** [_all] Error 2
case 2 When I try to create the 'pytest-runner' with the scanpypi the following error message is shown:
nnnn#xxxx:~/bldr2/buildroot$ ./support/scripts/scanpypi pytest-runner -o package
buildroot package name for pytest-runner: python-pytest-runner
Package: python-pytest-runner
Fetching package pytest-runner
Downloading package pytest-runner from https://pypi.python.org/packages/9e/4d/08889e5e27a9f5d6096b9ad257f4dea1faabb03c5ded8f665ead448f5d8a/pytest-runner-2.11.1.tar.gz...
Error: Could not install package pytest-runner
When I download the 'pytest-runner-2.11.1.tar.gz' from pypi manually it looks as normal pypi tar file. Any idea what is root cause and how to solve the problem?
-timo-

Related

Problem with building Chromium for Windows on Mac host

I am trying to cross build chromium on mac host. I have followed the instructions from https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/win_cross.md and everything seems fine. But when I run autoninja -C out/win chrome I face with the following error. Any help would be appreciated.
ninja: Entering directory `out/win'
[0/1] Regenerating ninja files
ERROR at //build/config/win/visual_studio_version.gni:27:7: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py", [ "get_toolchain_dir" ], "scope")
^----------
Current dir: /chromium/src/out/win/
Command: python3 /chromium/src/build/vs_toolchain.py get_toolchain_dir
Returned 1.
stderr:
Traceback (most recent call last):
File "/chromium/src/build/vs_toolchain.py", line 587, in <module>
sys.exit(main())
File "/chromium/src/build/vs_toolchain.py", line 583, in main
return commands[sys.argv[1]](*sys.argv[2:])
File "/chromium/src/build/vs_toolchain.py", line 561, in GetToolchainDir
win_sdk_dir = SetEnvironmentAndGetSDKDir()
File "/chromium/src/build/vs_toolchain.py", line 554, in SetEnvironmentAndGetSDKDir
return NormalizePath(os.environ['WINDOWSSDKDIR'])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'WINDOWSSDKDIR'
See //third_party/angle/gni/angle.gni:35:5: whence it was imported.
import("//build/config/win/visual_studio_version.gni")
^----------------------------------------------------
See //chrome/elevation_service/BUILD.gn:7:1: whence it was imported.
import("//build/toolchain/win/midl.gni")
^--------------------------------------
See //BUILD.gn:660:7: which caused the file to be included.
"//chrome/elevation_service:elevation_service_unittests",
^-------------------------------------------------------
FAILED: build.ninja
../../buildtools/mac/gn --root=../.. -q --ide=vs --regeneration gen .
ninja: error: rebuilding 'build.ninja': subcommand failed

PyQt5 Modules not Found?

This is a complete fresh install of MacOS!
Platform:
Apple MacBook Air - M1
MacOS Monterey
Package Info:
Homebrew: 3.3.14
pip: 22.0.3
Python: 3.9.10 (installed via 'brew install python')
Latest-Xcode
My $PATH environment:
/opt/homebrew/bin
/opt/homebrew/sbin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
I tried adding a combination of these to my $PATH, to no avail:
/opt/homebrew/lib/python3.9/site-packages
/opt/homebrew/Cellar/pyqt#5/5.15.6/lib/python3.9/site-packages/PyQt5
/opt/homebrew/lib/python3.9/site-packages/PyQt5
/opt/homebrew/opt/pyqt#5/5.15.6/bin
/opt/homebrew/opt/qt#5/5.15.6/bin
What I want to do:
pip install pyqt5
What happens when I try:
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/opt/homebrew/Cellar/python#3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/opt/homebrew/Cellar/python#3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sipbuild/abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/opt/homebrew/Cellar/python#3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sipbuild/project.py", line 594, in setup
self.apply_user_defaults(tool)
File "project.py", line 63, in apply_user_defaults
super().apply_user_defaults(tool)
File "/opt/homebrew/Cellar/python#3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "/opt/homebrew/Cellar/python#3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sipbuild/project.py", line 241, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "/opt/homebrew/Cellar/python#3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyqtbuild/builder.py", line 67, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
[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.
If I install it this way, I get no errors:
brew install pyqt#5
But my VS Code shows up like this, and none of submodules work:
My program used to work just fine, but I had recently installed Python 3.10 and have since uninstalled it. Ever since the new Python install, I've had this issue. Not sure how to tackle this. Thank you!
I've asked this question a number of different ways in a number of different places; none of the suggested answers work for me.
The closest thing to an answer that I got to was this:
https://www.zhihu.com/question/437075754/answer/1993415429
If you're unable to read it, it suggests this:
Pre-work, install homebrew, python 3.9.
First enter in the terminal:
brew install pyqt5
echo 'export PATH="/opt/homebrew/opt/qt#5/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/opt/homebrew/opt/pyqt#5/5.15.4_1/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Then, copy all the contents of
/opt/homebrew/Cellar/pyqt#5/5.15.4_1/lib/python3.9/site-packages to
lib/python3.9/site-packages folder. If your homebrew installation
address and python installation address are not the default, you need
to modify these two addresses.
Finally, try it in python
import PyQt5
But this didn't work for me, either.
In the end, I ended up just installing PyQt6:
pip install PyQt6
The install completed without any errors. Now I am working on updating my code. Hopefully this will be useful for someone else coming here from an angry Google search. Code on, my friends.
I had the issue as yours. I solve with the following command.
pip3 install pyqt5
my install setup is
1.brew install qt
2.brew install libxml2
reference by TheCrazySwede answer ↓↓↓
3.brew install pyqt5
enter image description here
4.brew cleanup pyqt#5
5.echo 'export PATH="/opt/homebrew/opt/qt#5/bin:$PATH"' >> ~/.zshrc
6.echo 'export PATH="/opt/homebrew/opt/pyqt#5/5.15.4_1/bin:$PATH"' >> ~/.zshrc
7.source ~/.zshrc
8.pip3 install pyqt5-sip
9.pip3 install pyqt5
enter image description here
enter image description here
10.pip3 install lxml
11.make qt5py3
I hope can help for you.

CalledProcessError while installing Tensorflow using Bazel

I am trying to install Tensorflow from source using Bazel on Raspberry pi. I am following the official documentation as given here. When I run the ./configure in Tensorflow directory after completing all the steps written for Bazel, I get the following error
/home/cvit/bin/bazel: line 88: /home/cvit/.bazel/bin/bazel-real: cannot execute binary file: Exec format error
/home/cvit/bin/bazel: line 88: /home/cvit/.bazel/bin/bazel-real: Success
Traceback (most recent call last):
File "./configure.py", line 1552, in <module>
main()
File "./configure.py", line 1432, in main
check_bazel_version('0.15.0')
File "./configure.py", line 450, in check_bazel_version
curr_version = run_shell(['bazel', '--batch', '--bazelrc=/dev/null', 'version'])
File "./configure.py", line 141, in run_shell
output = subprocess.check_output(cmd)
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['bazel', '--batch', '--bazelrc=/dev/null', 'version']' returned non-zero exit status 1
I didn't put the user flag in the bazel installation. So, I think this might be bazelrc error so I tried to set $PATH=$BAZEL/bin but nothing happened.
Please give any suggestion !!
Probably the problem is that the non appropriate version of bazel is installed.
Run bazel version in the tensorflow directory, and see if there is an error.
If there is a problem with bazel version, then check out the .baselversion file, and if it contains a version that isn't installable with apt, then dowload the installer from https://github.com/bazelbuild/bazel/releases then install it, else install with apt.
After that everything should work fine.

how to compile the tutorial program on tensorflow

After configuring the tensorflow, I tried to run the command
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
But an error occured which I tried every possible but failed to solve.
ERROR: Skipping '//tensorflow/cc:tutorials_example_trainer': error loading package 'tensorflow/cc': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '#local_config_cuda//cuda': Traceback (most recent call last):
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 1042
_create_local_cuda_repository(repository_ctx)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 975, in _create_local_cuda_repository
_host_compiler_includes(repository_ctx, cc)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 145, in _host_compiler_includes
get_cxx_inc_directories(repository_ctx, cc)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 120, in get_cxx_inc_directories
set(includes_cpp)
The set constructor for depsets is deprecated and will be removed. Please use the depset constructor instead. You can temporarily enable the deprecated set constructor by passing the flag --incompatible_disallow_set_constructor=false
WARNING: Target pattern parsing failed.
ERROR: error loading package 'tensorflow/cc': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '#local_config_cuda//cuda': Traceback (most recent call last):
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 1042
_create_local_cuda_repository(repository_ctx)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 975, in _create_local_cuda_repository
_host_compiler_includes(repository_ctx, cc)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 145, in _host_compiler_includes
get_cxx_inc_directories(repository_ctx, cc)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 120, in get_cxx_inc_directories
set(includes_cpp)
The set constructor for depsets is deprecated and will be removed. Please use the depset constructor instead. You can temporarily enable the deprecated set constructor by passing the flag --incompatible_disallow_set_constructor=false
INFO: Elapsed time: 2.293s
FAILED: Build did NOT complete successfully (0 packages loaded)
currently loading: tensorflow/cc
Note that: I've installed the CUDA8.0, cuDNN 5.0 and Bazel 0.6.0, My system is Ubuntu 16.04.
It seems there is already an issue open for this problem: https://github.com/tensorflow/tensorflow/issues/11859. Last comment says that the issue can be fixed by editing line 120 in tensorflow/third_party/gpus/cuda_configure.bzl. If that doesn't help I'd subscribe to the issue and wait for a fix.

Unable to setup WebRTC native android code on ubuntu instance

Followed steps provided in this web page https://webrtc.org/native-code/android/
When I executed command "ninja -C out/Debug AppRTCMobile" I got following response
ninja: Entering directory `out/Debug'
ninja: fatal: chdir to 'out/Debug' - No such file or directory
I got stuck here and need help to continue in executing the next steps to complete the code setup.
Ubuntu version - 16.04.2
I have followed the same procedure once again to setup the code. This time I got a new error
Steps:
-> fetch --nohooks webrtc_android
-> gclient sync
-> gn gen out/Debug --args='target_os="android" target_cpu="arm"'
-> ninja -C out/Debug
ninja: Entering directory `out/Debug'
[1/8508] ACTION
//base:android_runtime_jni_headers__jni_Runtime(//build/toolchain/android:android_clang_arm)
FAILED: gen/android_runtime_jni_headers/base/jni/Runtime_jni.h python
../../base/android/jni_generator/jni_generator.py --depfile
gen/base/android_runtime_jni_headers__jni_Runtime.d --jar_file
../../third_party/android_tools/sdk/platforms/android-26/android.jar
--input_file java/lang/Runtime.class --ptr_type=long --output_dir gen/android_runtime_jni_headers/base/jni --includes
../../../../../../base/android/jni_generator/jni_generator_helper.h
--native_exports_optional
Traceback (most recent call last):
File "../../base/android/jni_generator/jni_generator.py", line 1428,
in
sys.exit(main(sys.argv))
File "../../base/android/jni_generator/jni_generator.py", line 1421,
in main
GenerateJNIHeader(input_file, output_file, options) File "../../base/android/jni_generator/jni_generator.py", line 1326, in
GenerateJNIHeader
jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, options)
File "../../base/android/jni_generator/jni_generator.py", line 662,
in CreateFromClass
stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in
_execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[3/8508] CC obj/third_party/boringssl/boringssl/v3_ncons.o
ninja: build stopped: subcommand failed.
Someone please help me in resolving this issue.
You have to generate the projects using GN before trying to compile. You have the instructions here:
https://webrtc.org/native-code/android/