python-sfml icon indicating copy to clipboard operation
python-sfml copied to clipboard

Pip Installation errors

Open michuu123 opened this issue 5 years ago • 2 comments

Well, I tried to install sfml with pip install sfml, and that's a result

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Collecting sfml Using cached sfml-2.3.2.dev1.tar.gz (506 kB) Installing collected packages: sfml Running setup.py install for sfml ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jkpy4b0k/sfml/setup.py'"'"'; file='"'"'/tmp/pip-install-jkpy4b0k/sfml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-hqnvf_8o/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/michuu/.local/include/python3.6m/sfml cwd: /tmp/pip-install-jkpy4b0k/sfml/ Complete output (31 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/sfml copying src/sfml/init.py -> build/lib.linux-x86_64-3.6/sfml copying src/sfml/sf.py -> build/lib.linux-x86_64-3.6/sfml running build_ext cythoning src/sfml/system/system.pyx to src/sfml/system/system.cpp /home/michuu/.local/lib/python3.6/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-jkpy4b0k/sfml/src/sfml/system/system.pyx tree = Parsing.p_module(s, pxd, full_module_name) cythoning src/sfml/window/window.pyx to src/sfml/window/window.cpp /home/michuu/.local/lib/python3.6/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-jkpy4b0k/sfml/src/sfml/window/window.pyx tree = Parsing.p_module(s, pxd, full_module_name) cythoning src/sfml/graphics/graphics.pyx to src/sfml/graphics/graphics.cpp /home/michuu/.local/lib/python3.6/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-jkpy4b0k/sfml/src/sfml/graphics/graphics.pyx tree = Parsing.p_module(s, pxd, full_module_name) cythoning src/sfml/audio/audio.pyx to src/sfml/audio/audio.cpp /home/michuu/.local/lib/python3.6/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-jkpy4b0k/sfml/src/sfml/audio/audio.pyx tree = Parsing.p_module(s, pxd, full_module_name) cythoning src/sfml/network/network.pyx to src/sfml/network/network.cpp /home/michuu/.local/lib/python3.6/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-jkpy4b0k/sfml/src/sfml/network/network.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'sfml.system' extension creating build/temp.linux-x86_64-3.6/src creating build/temp.linux-x86_64-3.6/src/sfml creating build/temp.linux-x86_64-3.6/src/sfml/system x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iinclude/Includes -I/usr/include/python3.6m -Ibuild/temp.linux-x86_64-3.6/include -Ibuild/temp.linux-x86_64-3.6/include -Ibuild/temp.linux-x86_64-3.6/include -Ibuild/temp.linux-x86_64-3.6/include -Ibuild/temp.linux-x86_64-3.6/include -c src/sfml/system/system.cpp -o build/temp.linux-x86_64-3.6/src/sfml/system/system.o x86_64-linux-gnu-gcc: error trying to exec 'cc1plus': execvp: Nie ma takiego pliku ani katalogu error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jkpy4b0k/sfml/setup.py'"'"'; file='"'"'/tmp/pip-install-jkpy4b0k/sfml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-hqnvf_8o/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/michuu/.local/include/python3.6m/sfml Check the logs for full command output.

What can I do?

michuu123 avatar Apr 15 '20 18:04 michuu123

Got the same kind of issue, the libs are there, but for some reason cython doesn't call the link command with the path...

jokoon avatar May 05 '20 16:05 jokoon

On windows, tried many options, static/DLL, MD/MT etc

Now I have an error on python:

ImportError: DLL load failed: The specified module could not be found.

On top of this, this is wrong:

https://github.com/intjelic/python-sfml/blob/master/setup.py#L92

should be:

library_dirs.append(SFML_LIBRARIES)

jokoon avatar May 05 '20 16:05 jokoon