I'm getting the following error when trying to run
$ bazel build object_detection/...
And I'm getting ~20 of the same error (1 for each time it attempts to build that). I think it's something with the way I need to configure bazel to recognize the py_proto_library, but I don't know where, or how I would do this.
/src/github.com/tensorflow/tensorflow_models/object_detection/protos/BUILD:325:1: name 'py_proto_library' is not defined (did you mean 'cc_proto_library'?).
I also think it could be an issue with the fact that initially I had installed the cpp version of tensorflow, and then I built it for python.
The solution ended up being running this command, like the instructions say:
$ protoc object_detection/protos/*.proto --python_out=.
and then running this command, like the instructions say.:
$ export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
Are you using load in the BUILD file you're building?
load("#protobuf//:protobuf.bzl", "py_proto_library")?
The error seems to indicate the symbol py_proto_library isn't loaded into skylark.
Related
when I execute follow script in the vm,it take place this erro:
(yolox_torch) [root#localhost cenos]# cd /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/
(yolox_torch) [root#localhost install_prerequisites]# ./install_prerequisites_onnx.sh
sudo: python3.6: command not found
Error on or near line 64; exiting with status 1
I try to modify the python link,but it failed.
help!!
The error means that Python is not installed or your installation is damaged. Reinstalling Python will solve the error. Also, make sure to always run the setupvars.sh script before running any OpenVINO code. Refer to the instructions in the following guide:
https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_linux.html
I'm trying to use the Python interface for LHAPDF, but I receive the following error message:
Traceback (most recent call last):
File "test.py", line 2, in <module>
import lhapdf
ImportError: /home/n17182559/LHAPDF/lib/python2.7/site-packages/lhapdf.so: undefined symbol: _ZN6LHAPDF6ConfigD1Ev
I'm running on Ubuntu 17.04, using Python 2.7, have Boost installed and have a working C++ compiler (g++). I believe I have successfully installed LHAPDF, as I followed the instructions on their website and got no error message (only warnings that auto_ptr is deprecated, but I don't think I have control over that). I did add the ~/LHAPDF/lib/python2.7/sitepackages/ directory to $PYTHONPATH and ~/LHAPDF/bin/ directory to $PATH. I am using LHAPDF 6.1.6 (latest version as of writing this).
I get this error message from a test.py file that merely contains
#!/usr/bin/python
import lhapdf
If it can help you help me, I have found someone with a similar problem, but the cause seems not to be the same thing (I don't have Anaconda installed). As they solved their problem by removing Anaconda from $PATH, here are my $PATH and $PYTHONPATH as they might be the source of the problem (although I don't see how):
$PATH
/home/n17182559/LHAPDF/bin:/opt/applications/geant4/geant4.10.02-install/bin:/home/n17182559/ROOT/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:
$PYTHONPATH
/home/n17182559/ROOT/lib:/home/n17182559/LHAPDF/lib/python2.7/site-packages:
Hope you guys can help!
I solved it (with external help), if anyone wants the solution. The problem was that the main LHAPDF lib directory was not linked to my LD_LIBRARY_PATH. This command line solved it:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/LHAPDF/lib/libLHAPDF.so
(which I added to my ~/.bashrc file).
I can't speak to your specific problem, but when I get this class of error, it stems from a version mismatch between packages: lhapdf depends on another package to define that arcane "semi-hidden" symbol, but the package on which it depends is of a version different from the one expected; the older/newer version doesn't provide that symbol.
It is a version mismatch (of Python), which is likely caused by upgrading Python after LHAPDF is installed.
Therefore you may have to reinstall LHAPDF, or you could install a second LHAPDF if you use two versions of Python (as of now I am not aware of a solution other than this).
Let us assume you use LHAPDF of version 6.2 or higher, which is much simpler. First you would like to set the path in your shell profile so that it points to the version of Python you want to install LHAPDF for. For bash, you could do
export PATH=path/to/python
then you would like to follow the instruction and do
tar xf LHAPDF-6.X.Y.tar.gz
cd LHAPDF-6.X.Y
./configure --prefix=/path/for/installation
make
make install
After the installation is done, you can add LHAPDF to the path by
export PYTHONPATH=path/to/lhapdf/lib/pythonx.y/site-packages/
export LD_LIBRARY_PATH=path/to/lhapdf/lib
export PATH=path/to/lhapdf/bin/:$PATH
export LHAPDF_DATA_PATH=path/to/lhapdf/share/LHAPDF
I am trying to run a basic demo from Fenics (2016.2.0) on Ubuntu 16.04.2, Python 2.7, Anaconda (with Spyder for the IDE). The demo is ft_01poisson.py. The error says:
RuntimeError: In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '.../error/dolfin_6c..dc/compile.log'
Ok, let's take a look. Everything is fine until...
.../anaconda2/include/petscsys.h:144:6: error: #error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h"
# error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h"
Ok, let's see what the source says:
#elif defined(PETSC_HAVE_MPICH_NUMVERSION)
# if !defined(MPICH_NUMVERSION)
# error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h"
I track down ~/anaconda2/include/petscconf.h:
#define PETSC_HAVE_MPICH_NUMVERSION 30200300
Now, the version of ~/anaconda2/include/mpi.h that I have in is version 2.2, but I have another version of mpi.h in a mpich-3.2.4 install which does have the correct MPICH_NUMVERSION.
I tried a simple copy and paste of the relevant files and #includes to the ~/anaconda2/include/ folder to no avail (the first error is error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]).
So how do I fix this? How do I get the demo to run after following the instructions to install Fenics?
So, the answer is to work within the FenicsProject Environment as suggested by
conda create -n fenicsproject -c conda-forge fenics
I would delete my own question, but I don't know how. Enjoy everyone!
I did everything given in their documentation but I'm getting this error again and again....I tried googling and finding if anyone got the same error but nopes, didn't work out. Heres the command --
bazel test --linkopt=-headerpad_max_install_names \
syntaxnet/... util/utf8/...
And heres the error -
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package 'external': Extension file '#org_tensorflow//tensorflow:tensorflow.bzl' may not be loaded from a WORKSPACE file since the extension file is located in an external repository.
INFO: Elapsed time: 0.052s
ERROR: Couldn't start the build. Unable to run test
here is a very useful script for installation on ubuntu-14.04
https://github.com/JoshData/models/blob/b72274d38f169f77e6a15e54834f463f627dc82a/syntaxnet/build/ubuntu-14.04_x64.sh
Finally solved it, it was related to the bazel version.
I had installed it before, so the version was 0.1.5. But in the docs, its written supported ones are 0.2 - 0.2.2b. I tried to upgrade it using brew but it didn't work.
So I tried to directly install it using the 0.2.2b installer and it worked :)
I am trying to install python through cygwin on a windows machine in order to make use of a statistical program that can only be implemented using python in a linux environment.
I have run setup-x86_64.exe and installed all python related cygwin packages in an attempt to install python, but when I open a terminal and type python I just get
$ python
-bash: python: command not found
which is the same for all python commands I try so clearly the installation has not occurred. However, I have found a path to Python-2.7.9 which appears to contain the files required to build python from source.
When I run ./configure it is successful, but when I then input make it fails due to:
File "build/temp.cygwin-1.7.35-x86_64-2.7/libffi/fficonfig.py", line 33, in <module>
ffi_sources += ffi_platforms['X86_WIN64']
KeyError: 'X86_WIN64'
Makefile:488: recipe for target 'sharedmods' failed
make: *** [sharedmods] Error 1
Anyone know why make won't work?
The options in ./configure --help are unfamiliar to me, could any of these options allow for successful installation?
Any ideas would be greatly appreciated, thank you.
Cygwin comes with an installer, called setup.exe or setup-x86_64.exe. Just run it and type python to the search box. Then let it install it for you.
python language interpreter is the basic package you need.
So, this question is 3 years old, but this error still happens with most recent versions of Python 2 (tested with 2.7.13 and 2.7.15)
I was able to get python to build by modifying the following file in the build directory.
--- build/temp.cygwin-2.11.1-x86_64-2.7/libffi/fficonfig.py~ 2018-11-03 14:51:53.290000000 -0400
+++ build/temp.cygwin-2.11.1-x86_64-2.7/libffi/fficonfig.py 2018-11-03 14:53:41.793000000 -0400
## -9,6 +9,7 ##
'X86': ['src/x86/ffi.c', 'src/x86/sysv.S', 'src/x86/win32.S'],
'X86_FREEBSD': ['src/x86/ffi.c', 'src/x86/freebsd.S'],
'X86_WIN32': ['src/x86/ffi.c', 'src/x86/win32.S'],
+ 'X86_WIN64': ['src/x86/ffi.c', 'src/x86/win64.S'],
'SPARC': ['src/sparc/ffi.c', 'src/sparc/v8.S', 'src/sparc/v9.S'],
'ALPHA': ['src/alpha/ffi.c', 'src/alpha/osf.S'],
'IA64': ['src/ia64/ffi.c', 'src/ia64/unix.S'],
The source files, in particular src/x86/win64.S, are present in the source tree. For some reason, ./configure does not seem to be properly adding the option to the dictionary in the fficonfig.py file, which causes the KeyError posted in the question. After making this modification, make and make install completed successfully and I was able to install an alternate version of python in addition to the normal Cygwin package.
I'm not yet sure why this happens, but I thought I would attempt to provide a solution to the question actually asked rather than just telling the asker to install a pre-compiled version using the package manager.
Since building Python from source was said to be a bad idea, I assumed my Cygwin was broken. I attempted to uninstall Cygwin following the instructions on the Cygwin website, but I was unable to remove it due to permission difficulties (I use a university-supplied Windows machine). My last resort was to run the Cygwin installation wizard setup-x86_64.exe and uninstall all packages, then run the wizard once more and select the necessary packages again as if starting from new. Miraculously, installing the required packages from scratch solved the problem and I am now running Python through my Cygwin terminal with no errors.
If you want to run Python on Cygwin, you might need to build it from source.
download the source
unpack it to the directory you could delete later, eg: build
run Cygwin, type: cd /path/to/build
run ./configure --help and read the help about the options you'll need
./configure #options
make