You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
By clicking “Sign up for GitHub”, you agree to our
terms of service
and
privacy statement
. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
What is your question?
When I use the command
:
git clone
https://github.com/pytorch/fairseq
cd fairseq
pip install --editable .
I got this error
:
Obtaining file:///home/xiaojinhui/hzq/fairseq
Requirement already satisfied: cffi in /home/xiaojinhui/hzq/torch_py36/lib/python3.6/site-packages (from fairseq==0.9.0) (1.13.2)
Requirement already satisfied: cython in /home/xiaojinhui/hzq/torch_py36/lib/python3.6/site-packages (from fairseq==0.9.0) (0.29.14)
Requirement already satisfied: numpy in /home/xiaojinhui/hzq/torch_py36/lib/python3.6/site-packages (from fairseq==0.9.0) (1.18.0)
Requirement already satisfied: regex in /home/xiaojinhui/hzq/torch_py36/lib/python3.6/site-packages (from fairseq==0.9.0) (2019.12.20)
Requirement already satisfied: sacrebleu in /home/xiaojinhui/hzq/torch_py36/lib/python3.6/site-packages (from fairseq==0.9.0) (1.4.3)
Requirement already satisfied: torch in /home/xiaojinhui/hzq/torch_py36/lib/python3.6/site-packages (from fairseq==0.9.0) (1.3.1)
Requirement already satisfied: tqdm in /home/xiaojinhui/hzq/torch_py36/lib/python3.6/site-packages (from fairseq==0.9.0) (4.41.0)
Requirement already satisfied: pycparser in /home/xiaojinhui/hzq/torch_py36/lib/python3.6/site-packages (from cffi->fairseq==0.9.0) (2.19)
Requirement already satisfied: typing in /home/xiaojinhui/hzq/torch_py36/lib/python3.6/site-packages (from sacrebleu->fairseq==0.9.0) (3.7.4.1)
Requirement already satisfied: portalocker in /home/xiaojinhui/hzq/torch_py36/lib/python3.6/site-packages (from sacrebleu->fairseq==0.9.0) (1.5.2)
Installing collected packages: fairseq
Running setup.py develop for fairseq
ERROR: Command errored out with exit status 1:
command: /home/xiaojinhui/hzq/torch_py36/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/xiaojinhui/hzq/fairseq/setup.py'"'"';
file
='"'"'/home/xiaojinhui/hzq/fairseq/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(
file
);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code,
file
, '"'"'exec'"'"'))' develop --no-deps
cwd: /home/xiaojinhui/hzq/fairseq/
Complete output (24 lines):
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
running develop
running egg_info
writing fairseq.egg-info/PKG-INFO
writing dependency_links to fairseq.egg-info/dependency_links.txt
writing entry points to fairseq.egg-info/entry_points.txt
writing requirements to fairseq.egg-info/requires.txt
writing top-level names to fairseq.egg-info/top_level.txt
reading manifest file 'fairseq.egg-info/SOURCES.txt'
writing manifest file 'fairseq.egg-info/SOURCES.txt'
running build_ext
cythoning fairseq/data/data_utils_fast.pyx to fairseq/data/data_utils_fast.cpp
cythoning fairseq/data/token_block_utils_fast.pyx to fairseq/data/token_block_utils_fast.cpp
building 'fairseq.libbleu' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/fairseq
creating build/temp.linux-x86_64-3.6/fairseq/clib
creating build/temp.linux-x86_64-3.6/fairseq/clib/libbleu
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -std=c++11 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/home/xiaojinhui/hzq/torch_py36/include/python3.6m -c fairseq/clib/libbleu/libbleu.cpp -o build/temp.linux-x86_64-3.6/fairseq/clib/libbleu/libbleu.o -std=c++11 -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=libbleu -D_GLIBCXX_USE_CXX11_ABI=0
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -std=c++11 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/home/xiaojinhui/hzq/torch_py36/include/python3.6m -c fairseq/clib/libbleu/module.cpp -o build/temp.linux-x86_64-3.6/fairseq/clib/libbleu/module.o -std=c++11 -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=libbleu -D_GLIBCXX_USE_CXX11_ABI=0
fairseq/clib/libbleu/module.cpp:9:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/xiaojinhui/hzq/torch_py36/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/xiaojinhui/hzq/fairseq/setup.py'"'"';
file
='"'"'/home/xiaojinhui/hzq/fairseq/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(
file
);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code,
file
, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
What have you tried?
I have tried to search the questions, but I can't fix it.
What's your environment?
Ubuntu 16.04
fairseq Version (e.g., 1.0 or master):master
PyTorch Version (e.g., 1.0): 1.3
OS (e.g., Linux): Linux
How you installed fairseq (
pip
, source):source
Build command you used (if compiling from source):pip install --editable .
Python version: python3.6
CUDA/cuDNN version:9.0/7.0
GPU models and configuration:
Any other relevant information:
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.