amazon web services - Permission Denied while trying to run a Python package -


i'm trying use python package called csvkit on aws ec2 machine. able install after hiccups, might related - running pip install csvkit threw error @

with open(path, 'rb') stream:     ioerror: [errno 13] permission denied: '/usr/local/lib/python2.7/site-packages/python_dateutil-2.2-py2.7.egg/egg-info/requires.txt' 

but able install other command.

now onto original problem - when try run simple function within csvkit package cavstat, full error output:

[username ~]$ csvstat traceback (most recent call last):   file "/usr/local/bin/csvstat", line 5, in <module>     pkg_resources import load_entry_point   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3020, in <module>     working_set = workingset._build_master()   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 614, in _build_master     ws.require(__requires__)   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 920, in require     needed = self.resolve(parse_requirements(requirements))   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 815, in resolve     new_requirements = dist.requires(req.extras)[::-1]   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2552, in requires     dm = self._dep_map   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2537, in _dep_map     extra, reqs in split_sections(self._get_metadata(name)):   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2978, in split_sections     line in yield_lines(s):   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2252, in yield_lines     ss in strs:   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2566, in _get_metadata     line in self.get_metadata_lines(name):   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1589, in get_metadata_lines     return yield_lines(self.get_metadata(name))   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1581, in get_metadata     return self._get(self._fn(self.egg_info, name))   file "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1692, in _get     open(path, 'rb') stream: ioerror: [errno 13] permission denied: '/usr/local/lib/python2.7/site-packages/python_dateutil-2.2-py2.7.egg/egg-info/requires.txt' 

i'm not sure search see what's issue. related date-utils? i'm new linux world, editing configuration files , whatnot bit difficult me.

if you're doing system-wide install via 'pip install csvkit', you'll need sudo privileges current user, why install process has borked on modifying /usr/local/lib/python2.7 structure.

if you're on aws instance you've created, sudo privileges should pretty straightforward set current user.

if you're looking more contained alternative, install virtualenv , set isolated virtualenv (https://virtualenv.pypa.io/en/latest/installation.html) virtualenv might overkill throwaway server.

does @ all?


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -