Dobrodošli na FOSS Srbija

Free and Opensource Srbija je skup entuzijasta i ljubitelja slobodnog i otvorenog koda. Cilj nam je okupiti sve istomišljenike na jednom mestu i stvoriti najveći globalni OpenSource projekat u Srbiji i šire!

  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem pri instalacija Python paketa

Discussion in 'Programiranje' started by marecare, 08.05.2017.

  1. marecare

    Premium Donator

    Joined:
    09.05.2014
    Messages:
    1,209
    Likes Received:
    768
    Okruženje:
    Cinnamon
    Sistem:
    Mint
    Pokusavam da podesim okruzenje za rad u Python-u. Za Visual Code Studio sam instalirao neke ekstenzije, medju kojima neki linter, koji da bi radio (i da ne bi smarao pri svakom otkucanom redu) mora da ima instalirane pakate: autopep8 i pylint
    E sad, posto u VCS prijavi da mi ti paketi fale i posto ima integrisani terminal, on mi ponudi opciju "install" i kada kliknem na nju pokrece instalaciju u terminalu ali instalacija ne uspeva i prijavljuje sledece:


    marko@LinuxMint18 ~/Desktop $ /usr/bin/python -m pip install autopep8
    Collecting autopep8
    Using cached autopep8-1.3.1.tar.gz
    Collecting pycodestyle>=2.3 (from autopep8)
    Downloading pycodestyle-2.3.1-py2.py3-none-any.whl (45kB)
    100% |████████████████████████████████| 51kB 672kB/s
    Installing collected packages: pycodestyle, autopep8
    Exception:
    Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line
    215, in main
    status = self.run(options, args)
    File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py",
    line 342, in run
    prefix=options.prefix_path,
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line
    784, in install
    **kwargs
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", l
    ine 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", l
    ine 1064, in move_wheel_files
    isolated=self.isolated,
    File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 345, i
    n move_wheel_files
    clobber(source, lib_dir, True)
    File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 323, i
    n clobber
    shutil.copyfile(srcfile, destfile)
    File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
    IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-pac
    kages/pycodestyle.pyc'
    marko@LinuxMint18 ~/Desktop $ /usr/bin/python -m pip install pylint
    Collecting pylint
    Downloading pylint-1.7.1-py2.py3-none-any.whl (641kB)
    100% |████████████████████████████████| 645kB 1.5MB/s
    Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from pylint)
    Collecting mccabe (from pylint)
    Downloading mccabe-0.6.1-py2.py3-none-any.whl
    Collecting singledispatch; python_version < "3.4" (from pylint)
    Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl
    Collecting isort>=4.2.5 (from pylint)
    Downloading isort-4.2.5-py2.py3-none-any.whl (40kB)
    100% |████████████████████████████████| 40kB 1.7MB/s
    Collecting astroid>=1.5.1 (from pylint)
    Downloading astroid-1.5.2-py2.py3-none-any.whl (269kB)
    100% |████████████████████████████████| 276kB 1.0MB/s
    Collecting configparser; python_version == "2.7" (from pylint)
    Downloading configparser-3.5.0.tar.gz
    Collecting backports.functools-lru-cache; python_version == "2.7" (from pylint)
    Downloading backports.functools_lru_cache-1.3-py2.py3-none-any.whl
    Collecting lazy-object-proxy (from astroid>=1.5.1->pylint)
    Downloading lazy_object_proxy-1.3.1-cp27-cp27mu-manylinux1_x86_64.whl (56kB)
    100% |████████████████████████████████| 61kB 1.1MB/s
    Requirement already satisfied: enum34; python_version < "3.4" in /usr/lib/python2.7/dist-packages (from astroid>=1.5.1->pylint)
    Collecting wrapt (from astroid>=1.5.1->pylint)
    Downloading wrapt-1.10.10.tar.gz
    Installing collected packages: mccabe, singledispatch, isort, lazy-object-proxy, wrapt, backports.functools-lru-cache, astroid, configparser, pylint
    Exception:
    Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
    File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 784, in install
    **kwargs
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
    File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
    File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
    File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
    IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/mccabe.pyc'

    Pa ako neko moze da pomogne noob-u! Hvala unapred
     
  2. MyName

    Korisnik

    Joined:
    30.12.2016
    Messages:
    95
    Likes Received:
    102
    Okruženje:
    Gnome3
    Sistem:
    Debian
    Па побогу - имаш проблем са дозволама! Значи, ако покрећеш PIP или Visual Code, из командне линије их покрени са sudo.
     
  3. marecare

    Premium Donator

    Joined:
    09.05.2014
    Messages:
    1,209
    Likes Received:
    768
    Okruženje:
    Cinnamon
    Sistem:
    Mint
    Hvala, to je to.
    Pokrenuo sam terminal i raspalio:
    sudo /usr/bin/python -m pip install autopep8
    sudo /usr/bin/python -m pip install pylint
     
  4. MyName

    Korisnik

    Joined:
    30.12.2016
    Messages:
    95
    Likes Received:
    102
    Okruženje:
    Gnome3
    Sistem:
    Debian
    Нема не чеме :) И други пут ;)
     
  5. marecare

    Premium Donator

    Joined:
    09.05.2014
    Messages:
    1,209
    Likes Received:
    768
    Okruženje:
    Cinnamon
    Sistem:
    Mint
SSL Certificate Biblioteka++ Tor anonimnost Cyberghost vyprvpn