Python 我需要安装";quandl";。但当我输入;sudo pip安装quandl“;在终端中,我得到以下错误:

Python 我需要安装";quandl";。但当我输入;sudo pip安装quandl“;在终端中,我得到以下错误:,python,linux,machine-learning,ubuntu-16.04,quandl,Python,Linux,Machine Learning,Ubuntu 16.04,Quandl,然后,我尝试在终端中使用“sudopip安装加密”手动安装“加密”。然后我得到了以下错误: eranga@eranga-Inspiron-3521:~$ sudo pip install quandl The directory '/home/eranga/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check t

然后,我尝试在终端中使用“sudopip安装加密”手动安装“加密”。然后我得到了以下错误:

eranga@eranga-Inspiron-3521:~$ sudo pip install quandl
The directory '/home/eranga/.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/eranga/.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.
Collecting quandl
  Downloading Quandl-3.1.0-py2.py3-none-any.whl
Requirement already satisfied: pyasn1 in /usr/local/lib/python2.7/dist-packages (from quandl)
Requirement already satisfied: six in /usr/local/lib/python2.7/dist-packages (from quandl)
.
.
.
.
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'docs/_build'
    warning: no previously-included files matching '*' found under directory 'vectors'
    writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
    running build_ext
    generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c'
    creating build/temp.linux-x86_64-2.7
    generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c'
    generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'
    building '_openssl' extension
    creating build/temp.linux-x86_64-2.7/build
    creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
    build/temp.linux-x86_64-2.7/_openssl.c:12:24: fatal error: pyconfig.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-y31ZOD/cryptography/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-G6XXj_-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-y31ZOD/cryptography/
eranga@eranga-Inspiron-3521:~$ 
我看了很多网站,读了很多文章,仍然无法摆脱这个错误。我对“quandl”和机器学习都是新手。因此,如果有任何详细的安装“quandl”的方法,我将不胜感激

运行:

eranga@eranga-Inspiron-3521:~$ sudo pip install cryptography
.
.
.
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'docs/_build'
    warning: no previously-included files matching '*' found under directory 'vectors'
    writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
    running build_ext
    generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c'
    creating build/temp.linux-x86_64-2.7
    generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c'
    generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'
    building '_openssl' extension
    creating build/temp.linux-x86_64-2.7/build
    creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
    build/temp.linux-x86_64-2.7/_openssl.c:12:24: fatal error: pyconfig.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-N2rfmu/cryptography/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-woVGjj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-N2rfmu/cryptography/
eranga@eranga-Inspiron-3521:~$ 
没有
sudo
功能。见Qandl。运行一个
sudopip
与python社区和Mikko Ohtamaa提到的糟糕做法背道而驰。使用
sudo
将导致
Root
重写包数据,普通用户将不再具有写入权限

运行:

eranga@eranga-Inspiron-3521:~$ sudo pip install cryptography
.
.
.
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'docs/_build'
    warning: no previously-included files matching '*' found under directory 'vectors'
    writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
    running build_ext
    generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c'
    creating build/temp.linux-x86_64-2.7
    generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c'
    generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'
    building '_openssl' extension
    creating build/temp.linux-x86_64-2.7/build
    creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
    build/temp.linux-x86_64-2.7/_openssl.c:12:24: fatal error: pyconfig.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-N2rfmu/cryptography/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-woVGjj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-N2rfmu/cryptography/
eranga@eranga-Inspiron-3521:~$ 

没有
sudo
功能。见Qandl。运行一个
sudopip
与python社区和Mikko Ohtamaa提到的糟糕做法背道而驰。使用
sudo
将导致
Root
重写包数据,普通用户将不再具有写入权限

这对我不起作用。下面是我运行
pip install quandl
时得到的结果<代码>安装收集的软件包:pytz、numpy、pandas、加密异常:回溯(最近一次调用):文件“/usr/local/lib/python2.7/dist-packages/pip/basecommand.py”,主代码第215行。OSError:[Errno 13]权限被拒绝:'/usr/local/lib/python2.7/dist-packages/pytz-2017.2.dist-info'它对我不起作用。下面是我运行
pip install quandl
时得到的结果<代码>安装收集的软件包:pytz、numpy、pandas、加密异常:回溯(最近一次调用):文件“/usr/local/lib/python2.7/dist-packages/pip/basecommand.py”,主代码第215行。OSError:[Errno 13]权限被拒绝:'/usr/local/lib/python2.7/dist-packages/pytz-2017.2.dist-info'