Comments (3)
Since you used "python setup.py install" it is going to have to build it from source. You don't have tools installed to build it from source. Install "gcc" and try again.
from py-lmdb.
I already have gcc installed and it is the newest version. Can you please open the issue? Because it is not resolved!
(pvrender) mona@mona-VirtualBox:~/py-lmdb$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(pvrender) mona@mona-VirtualBox:~/py-lmdb$ python setup.py install
py-lmdb: Using bundled liblmdb with py-lmdb patches; override with LMDB_FORCE_SYSTEM=1 or LMDB_PURE=1.
patching file lmdb.h
patching file mdb.c
py-lmdb: Using CPython extension; override with LMDB_FORCE_CFFI=1.
running install
running bdist_egg
running egg_info
writing dependency_links to lmdb.egg-info/dependency_links.txt
writing top-level names to lmdb.egg-info/top_level.txt
writing lmdb.egg-info/PKG-INFO
reading manifest file 'lmdb.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
writing manifest file 'lmdb.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying lmdb/_config.py -> build/lib.linux-x86_64-3.5/lmdb
running build_ext
building 'cpython' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ilib/py-lmdb -Ibuild/lib -I/home/mona/pvrender/include -I/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/include/python3.5m -c lmdb/cpython.c -o build/temp.linux-x86_64-3.5/lmdb/cpython.o -DHAVE_PATCHED_LMDB=1 -UNDEBUG -w
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ilib/py-lmdb -Ibuild/lib -I/home/mona/pvrender/include -I/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/include/python3.5m -c build/lib/mdb.c -o build/temp.linux-x86_64-3.5/build/lib/mdb.o -DHAVE_PATCHED_LMDB=1 -UNDEBUG -w
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ilib/py-lmdb -Ibuild/lib -I/home/mona/pvrender/include -I/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/include/python3.5m -c build/lib/midl.c -o build/temp.linux-x86_64-3.5/build/lib/midl.o -DHAVE_PATCHED_LMDB=1 -UNDEBUG -w
gcc -pthread -shared -L/opt/lib/bz2/lib -L/opt/lib/lzma/lib -L/opt/lib/ssl/lib -L/opt/lib/zlib/lib -L/opt/lib/libc6/lib -L/opt/lib/ncurses/lib -L/opt/lib/gpm/lib -L/opt/lib/sqlite/lib -L/opt/lib/readline/lib -Wl,--version-script=python.map build/temp.linux-x86_64-3.5/lmdb/cpython.o build/temp.linux-x86_64-3.5/build/lib/mdb.o build/temp.linux-x86_64-3.5/build/lib/midl.o -o build/lib.linux-x86_64-3.5/lmdb/cpython.cpython-35m-x86_64-linux-gnu.so
/usr/bin/ld: cannot open linker script file python.map: No such file or directory
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
(pvrender) mona@mona-VirtualBox:~/py-lmdb$ sudo apt install gcc
[sudo] password for mona:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version (4:5.3.1-1ubuntu1).
from py-lmdb.
also, when I tried it with sudo pip install lmdb
I got this error when importing it:
(pvrender) mona@mona-VirtualBox:~/py-lmdb$ sudo pip install lmdb
The directory '/home/mona/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/mona/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied (use --upgrade to upgrade): lmdb in /usr/lib/python2.7/dist-packages
You are using pip version 8.1.1, however version 23.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(pvrender) mona@mona-VirtualBox:~/py-lmdb$ python
Python 3.5.3 (default, May 18 2017, 14:40:48)
[GCC 5.4.1 20161019] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lmdb
/usr/bin/ld: cannot open linker script file python.map: No such file or directory
collect2: error: ld returned 1 exit status
Traceback (most recent call last):
File "/home/mona/py-lmdb/lmdb/__init__.py", line 42, in <module>
from lmdb.cpython import *
ImportError: No module named 'lmdb.cpython'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/lib/python3.5/distutils/unixccompiler.py", line 196, in link
self.spawn(linker + ld_args)
File "/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/lib/python3.5/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/lib/python3.5/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mona/pvrender/lib/python3.5/site-packages/cffi/ffiplatform.py", line 51, in _build
dist.run_command('build_ext')
File "/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/lib/python3.5/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/lib/python3.5/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/lib/python3.5/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/lib/python3.5/distutils/command/build_ext.py", line 558, in build_extension
target_lang=language)
File "/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/lib/python3.5/distutils/ccompiler.py", line 717, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "/home/mona/blender-2.79a-linux-glibc219-x86_64/2.79/python/lib/python3.5/distutils/unixccompiler.py", line 198, in link
raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mona/py-lmdb/lmdb/__init__.py", line 48, in <module>
from lmdb.cffi import *
File "/home/mona/py-lmdb/lmdb/cffi.py", line 379, in <module>
library_dirs=_config_vars['extra_library_dirs'])
File "/home/mona/pvrender/lib/python3.5/site-packages/cffi/api.py", line 468, in verify
lib = self.verifier.load_library()
File "/home/mona/pvrender/lib/python3.5/site-packages/cffi/verifier.py", line 105, in load_library
self._compile_module()
File "/home/mona/pvrender/lib/python3.5/site-packages/cffi/verifier.py", line 202, in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
File "/home/mona/pvrender/lib/python3.5/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/mona/pvrender/lib/python3.5/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.VerificationError: LinkError: command 'gcc' failed with exit status 1
from py-lmdb.
Related Issues (20)
- Is Transaction.stat() for named databases showing incorrect number of entries? HOT 1
- Random crahes in multiprocess when opening the environment. HOT 1
- Build and tests fail on MINGW platform HOT 7
- Written data in the database contains weird character sequences. HOT 3
- SIGBUS when reading from Environment HOT 4
- json.JSONDecoder causes Environment.begin to throw ReadersFullError HOT 2
- MDB_BAD_RSLOT after fork due to spare txn
- installing lmdb for Blender bundled Python 3.5.3 on Ubuntu 22.04 from pip or scratch HOT 1
- py-lmdb: Using system version of liblmdb. Using cffi extension. /usr/bin/ld: cannot open linker script file python.map: No such file or directory HOT 1
- lmdb stuck/hang when use multiprocessing process(pytorch dataloder). HOT 2
- install error on windows with python 3.12 backend HOT 2
- Consider upgrading the LMDB library HOT 3
- [Bug] Memory leak occurring when using `lmdb.open`
- Linux x86_64 wheel for Python 3.12 HOT 1
- Remove me from PyPI HOT 1
- Does py-lmdb support python coroutines (asyncio)? HOT 1
- Path to patch command is hardcoded
- Env memory leak HOT 1
- Project Status? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-lmdb.