System Information
OS: CentOS 6.8Python: 2.7.11
Problem
Hi all, I would like to install tensorflow. Since I am using CentOS 6.8, it seems there is not official way to install tensoflow. Therefore, I googled for several ways to install it, and I followed this guide: https://blog.abysm.org/2016/06/building-tensorflow-centos-6/
(Other guides didn't work for me, some are glibc problem, some are "not a support wheel" problem, etc.)
However, now I would like to use GPU to accelerate. I have installed cuda and cudnn, but when I tried to build tensorflow with gpu in a way similar to the guide mentioned above(in the ./configure step I chose "enable cuda"), I got errors like this:
[root#Linux1 tensorflow]# ~/bin/bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
ERROR: /root/.cache/bazel/_bazel_root/a3c166d17dc24b80d65cd498892a86b2/external/protobuf/BUILD:609:1: Linking of rule '#protobuf//:python/google/protobuf/internal/_api_implementation.so' failed: link_dynamic_library.sh
failed: error executing command external/bazel_tools/tools/cpp/link_dynamic_library.sh no ignored ignored ignored
external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -shared -o ... (remaining 10 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
/usr/bin/ld: unrecognized option '-plugin'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 14.665s, Critical Path: 2.62s
I am new to linux, and I have no idea what's going on. Is there possible way to solve this problem? Thanks in advance.
Related
I'm following this tutorial to install caffe on my OSX High Sierra.
I followed all steps but I'm stucked when installing R-CNN example at this step:
$ make -j8 && make pycaffe
LD -o .build_release/lib/libcaffe.so
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
ld: cannot link directly with /System/Library/Frameworks//vecLib.framework/vecLib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [.build_release/lib/libcaffe.so] Error 1
But the library veclib is present:
$ ls /System/Library/Frameworks//vecLib.framework/vecLib
/System/Library/Frameworks//vecLib.framework/vecLib
Can you help me please to solve this issue ?
I met the same issue. I installed Xcode 9.3 Commandline tool and changed cmake/Modules/FindvecLib.cmake to something like this and it works:
find_path(vecLib_INCLUDE_DIR cblas.h
DOC "vecLib include directory"
PATHS /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/
NO_DEFAULT_PATH)
For my case, NO_DEFAULT_PATH must be set or there will be still link error.
You can also refer to this.
I'm getting a strange linker error that I don't completely understand while attempting to install postgresql on OSX.
I've installed Postgres via Brew and now I'm trying to get my Django app up and running. I've added the postgres directory to my path. I'm running OSX Yosemite.
When I run the following command:
pip install psycopg2
I get this error:
ld: illegal text reloc in '_init_psycopg' to '_lobjectType' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1
I'm at a loss where to go from here and my searches for this type of error has lead me no where. Any help would be amazing.
Thanks.
Turns out I had a couple versions of Postgres installed. I had to remove the old one and make sure the pg_config that was found in the PATH was the most recent one. As soon as I made sure the pg_config was the proper one, this error went away.
I have a web app developed with web.py using python 2.7.5.
I need to deploy it on a server running Scientific Linux 6.5. It comes with python 2.6.6 and the system requires this version, so I had to install python 2.7.5 in parallel.
What I need to do is to install mod_wsgi that uses python 2.7.5. I couldn't find a pre-compiled package, so I attempted to build one from source. I downloaded the source of mod_wsgi-3.4.
I ran configure with:
./configure --with-python=/home/mapto/Python-2.7.5/python
and got response:
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking Apache version... 2.2.15
configure: creating ./config.status
config.status: creating Makefile
When I run make it fails with:
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
.
make: * [mod_wsgi.la] Error 1
How can I sort out this problem? Would it help installing apxs2? If so, how can I do that? (apparently when I executed "yum install httpd-devel" it installed apxs, not apxs2)
This worked for me: apxs:Error: Command failed with rc=65536
I had to also do this, because of the parallel python versions: Python executable not finding libpython shared library
I am using Active Python 2.5.1, Mercurial 1.8.1 and TortoiseHg 1.1.0
on Windows XP (all x86)
I am trying to configure a mercurial repo in reviewboard. For that it
requires mercurial python module
So when i try to install mercurial via easy_install i get the
following error
C:\>easy_install mercurial==1.8.1
Searching for mercurial==1.8.1
Reading http://pypi.python.org/simple/mercurial/
Reading http://mercurial.selenic.com/
Reading http://www.selenic.com/mercurial
Reading http://mercurial.selenic.com/release/
Best match: mercurial 1.8.1
Downloading http://mercurial.selenic.com/release/mercurial-1.8.1.tar.gz
Processing mercurial-1.8.1.tar.gz
Running mercurial-1.8.1\setup.py -q bdist_egg --dist-dir c:
\docume~1\username\locals~1\temp\easy_install-7l0ykf
\mercurial-1.8.1\egg-dist-tmp-egcnt6
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: Setup script exited with error: command 'gcc' failed with exit
status 1
I have installed gcc through MinGW
Thanks shu zOMG chen, 1.8.1 is a requirement so can't really change that.The second link did help, but now there's another problem. After removing -mno-cygwin occurences from distutils\cygwinccompiler.py I ran easy_install mercurial==1.8.1. The trace is as folows :
C:\>easy_install mercurial==1.8.1
Searching for mercurial==1.8.1
Reading http://pypi.python.org/simple/mercurial/
Reading http://mercurial.selenic.com/
Reading http://www.selenic.com/mercurial
Reading http://mercurial.selenic.com/release/
Best match: mercurial 1.8.1
Downloading http://mercurial.selenic.com/release/mercurial-1.8.1.tar.gz
Processing mercurial-1.8.1.tar.gz
Running mercurial-1.8.1\setup.py -q bdist_egg --dist-dir c:\docume~1\username\locals~1\temp\easy_install-05el_6\mercurial-1.8.1\egg-dist-tmp-zsfye0
gcc: error: CreateProcess: No such file or directory
error: Setup script exited with error: command 'gcc' failed with exit status 1
C:\>
Please Help
Regards
From your output it appears that easy_install is trying to build mercurial with an option that requires some cygwin parts. If you're using mingw gcc you might want to look at https://www.mercurial-scm.org/wiki/BuildingOnWindows for instuctions on how to build in windows.
Is there a reason you're using 1.8.1? The latest version is 2.1.2.
Googling around, Compiling with cython and mingw produces gcc: error: unrecognized command line option '-mno-cygwin' might help you with this too.
There are also exe and msi installers for Windows at https://www.mercurial-scm.org/downloads.
In my opinion, the TortoiseXXX changes the mental picture of what is behind the wrapper. It was difficult for me to explain to my colleague how to work with CVS correctly when TortoiseCVS was used.
Off topic: For your own other purpose, try also Git instead (http://git-scm.com/) The idea is very similar. I guess the Git is going to win statistically.
The msysgit (Windows) is nice, the functionality is comparable with the original Linux one, the included Git Gui and gitk may have rather strange look (Tcl/Tk), but they are very good for the basic Git operations.
I have tried to install ShoutPY (http://dingoskidneys.com/shoutpy/) under python 2.7 x86 on windows but install fails with:
C:\Python27\Scripts>easy_install shoutpy
Searching for shoutpy
Reading http://pypi.python.org/simple/shoutpy/
Reading http://dingoskidneys.com/shoutpy/
Best match: shoutpy 1.0.0
Downloading http://dingoskidneys.com/shoutpy/shoutpy-1.0.0.tar.gz
Processing shoutpy-1.0.0.tar.gz
Writing c:\users\vladim~1\appdata\local\temp\easy_install-pnwegl\shoutpy-1.0.0\s
etup.cfg
Running shoutpy-1.0.0\setup.py -q bdist_egg --dist-dir c:\users\vladim~1\appdata
\local\temp\easy_install-pnwegl\shoutpy-1.0.0\egg-dist-tmp-otdtxq
shoutpy.cc:26:28: fatal error: boost/python.hpp: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
What I figured out is that I am missing Boost.python. Tried to find how to install it but failed, could anyone help me out?
thanks.
I'm guessing you're not running this under Cygwin, so you have a couple challenges. Did you install gcc? It's required by your install. You'll also need Boost installed and as Bart said in the comments, the best thing to do is to check out their build/install documentation.