权限被拒绝ipython_genutils

时间:2017-01-10 14:12:35

标签: jupyter-notebook permission-denied

我正在尝试在我的Ubuntu上安装jupyter笔记本,但是出现了错误,我无法修复它。非常感谢有人可以提供帮助。

抱怨如下:

Exception:
 Traceback (most recent call last):
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
   File "/home/shaoshuai/.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/shaoshuai/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
   File "/usr/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/ipython_genutils'
 shaoshuai@shaoshuai-ThinkPad-T420:~$ pip install ipython_genutils
   Collecting ipython_genutils
   Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl
Installing collected packages: ipython-genutils
Exception:
 Traceback (most recent call last):
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
   File "/home/shaoshuai/.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/shaoshuai/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
   File "/home/shaoshuai/.local/lib/python3.5/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
   File "/usr/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
  

PermissionError:[Errno 13]权限被拒绝:   ' /usr/local/lib/python3.5/dist-packages/ipython_genutils'

1 个答案:

答案 0 :(得分:0)

最好使用root权限安装软件包,但最好使用用户。 这是使用:

完成的
MemoryStream ms = new MemoryStream();
pictureBox1.Image.Save(ms,System.Drawing.Imaging.ImageFormat.Jpeg);
byte[] img = ms.ToArray();