我使用的是Ubuntu 14.04和Python 3.5;我使用<?php
$files = glob("images/*.png");
$current = file_get_contents("current.txt");
if (count($files) <= $current) {
$current = 1;
} else {
$current++;
}
$im = imagecreatefrompng("images/".$current.".png");
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
file_put_contents("current.txt", $current);
?>
来安装quandl包。我看到下面的错误。
另一方面,我尝试了两种方法:
下载.whl包并提供.whl文件所在的路径。我看到同样的错误如下。
pip install quandl
我试过的其他方法是使用Processing ./Documents/Quandl-3.2.0-py2.py3-none-any.whl
Collecting inflection>=0.3.1 (from Quandl==3.2.0)
Requirement already satisfied: requests<2.18,>=2.7.0 in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Requirement already satisfied: numpy>=1.8 in ./.local/lib/python3.5/site-packages (from Quandl==3.2.0)
Collecting more-itertools (from Quandl==3.2.0)
Using cached more_itertools-3.2.0-py3-none-any.whl
Requirement already satisfied: python-dateutil in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Requirement already satisfied: pandas>=0.14 in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Installing collected packages: inflection, more-itertools, Quandl
Exception:
Traceback (most recent call last):
File "/home/rr/.local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/rr/.local/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/home/rr/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/home/rr/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/home/rr/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/home/rr/.local/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/home/rr/.local/lib/python3.5/site-packages/pip/wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "/usr/lib/python3.5/shutil.py", line 115, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/inflection.py'
。使用此方法时,我看到下面的错误
sudo -apt get install python -3 quandl
对于方法1:我无法理解为什么我收到权限被拒绝错误消息。
对于方法2:为什么无法找到包?
我将非常感谢您对这些错误消息的任何建议以及在ubuntu 14.04中在python 3.5上安装此软件包的任何帮助。