-3

I have a problem.

Error log picture

How I can solve this, when I write: pip install -r requirements.txt

In my case in Python install ways, please help to understand. Thanks!

aset8
  • 1
  • 1
  • 2
    You can use `sudo`. Although the recommended way to install requirements for a project is to use [virtualenv](https://virtualenv.pypa.io/en/stable/). – Jim Wright Feb 14 '18 at 12:37
  • Possible duplicate of [Python - IOError: \[Errno 13\] Permission denied:](https://stackoverflow.com/questions/10575750/python-ioerror-errno-13-permission-denied) – Jared Smith Feb 14 '18 at 12:40
  • Possible duplicate of [pip install -r: OSError: \[Errno 13\] Permission denied](https://stackoverflow.com/questions/31512422/pip-install-r-oserror-errno-13-permission-denied) – phd Feb 14 '18 at 13:45

2 Answers2

0

The errors suggest that the user you are trying to install the python module with, aset, does not have permission to write in the default python modules install path. You may:

  1. Use sudo pip install -r requirements.txt to install as super user

  2. Download the packages from the requirement file requirements.txt in your user's home directory, untar them and import them in your script.

You may use:

pip install -r requirements.txt --no-index --find-links file:///tmp/packages

to get all packages from your requirements file.

Original source for above command here

To import python modules from a custom path:

import sys
sys.path.append('/home/user/module_directory')
from module_directory import module
AnythingIsFine
  • 1,777
  • 13
  • 11
0

you can use sudo to install the package in the system folder (not recommended)

sudo pip3.5 install 'the_package_name'

or you can use --user option to install the package in the user folder

pip3.5 install 'the_package_name' --user
Amr Zaghloul
  • 101
  • 6