Skip to content

Commit

Permalink
Fix: Fixxed issue #664
Browse files Browse the repository at this point in the history
Fixed issue when pip package manager related commands raises error

Updated the documentation

Fixes #664
  • Loading branch information
devkapilbansal committed Sep 20, 2020
1 parent 6271955 commit 5ceb31f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 29 deletions.
69 changes: 48 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Mentorship System (Backend)

![Build Status](https://github.com/anitab-org/mentorship-backend/workflows/Run%20tests/badge.svg)
Expand Down Expand Up @@ -38,17 +39,32 @@ To setup the project locally read these wiki pages and follow the instructions:

The project runs on Python 3.

1. Create a virtual environment:
`virtualenv venv --python=python3`
1. Install latest version of virtualenv:
```
pip install -U virtualenv
```

2. Activate the virtual environment:
`source /venv/Scripts/activate` for Git Bash Users,
`venv\Scripts\activate` for Windows Command Line Users
2. Create a virtual environment:
```
virtualenv venv --python=python3
```

3. Install all the dependencies in `requirements.txt` file:
`pip install -r requirements.txt`
3. Activate the virtual environment:
```
source /venv/Scripts/activate
```
for Git Bash Users,
```
venv\Scripts\activate
```
for Windows Command Line Users

4. Make sure you create `.env` using `.env.template` and update the values of corresponding environment variables
4. Install all the dependencies in `requirements.txt` file:
```
pip install -r requirements.txt
```

5. Make sure you create `.env` using `.env.template` and update the values of corresponding environment variables
or make sure you exported the following [environment variables](docs/environment-variables.md):

```
Expand All @@ -71,14 +87,14 @@ export DB_ENDPOINT=<database_endpoint>
export DB_NAME=<database_name>
```

5. Run the app:
6. Run the app:
```
python run.py
```

6. Navigate to http://localhost:5000 in your browser
7. Navigate to http://localhost:5000 in your browser

7. When you are done using the app, deactivate the virtual environment:
8. When you are done using the app, deactivate the virtual environment:
```
deactivate
```
Expand All @@ -87,16 +103,27 @@ deactivate

The project runs on Python 3.

1. Create a virtual enviorntment:
`virtualenv venv`
1. Install latest version of virtualenv:
```
pip install -U virtualenv
```

2. Create a virtual enviorntment:
```
virtualenv venv
```

2. Activate the virtual environment:
`source venv/bin/activate`
3. Activate the virtual environment:
```
source venv/bin/activate
```

3. Install all the dependencies in `requirements.txt` file:
`pip3 install -r requirements.txt`
4. Install all the dependencies in `requirements.txt` file:
```
pip3 install -r requirements.txt
```

4. Make sure you create `.env` using `.env.template` and update the values of corresponding environment variables. Make sure you exported the following [environment variables](docs/environment-variables.md) if you didn't adapt `.env.template` in the `.env` file:
5. Make sure you create `.env` using `.env.template` and update the values of corresponding environment variables. Make sure you exported the following [environment variables](docs/environment-variables.md) if you didn't adapt `.env.template` in the `.env` file:

```
export FLASK_ENVIRONMENT_CONFIG=<local-or-dev-or-test-or-prod-or-stag>
Expand All @@ -120,15 +147,15 @@ export DB_NAME=<database_name>

Use: `printenv` to print the environment variables and check all configurations.

5. Run the app with `python run.py` or:
6. Run the app with `python run.py` or:
```
export FLASK_APP=run.py
flask run
```

6. Navigate to http://localhost:5000 or the current server in which you are running(will be shown when app is running) in your browser.
7. Navigate to http://localhost:5000 or the current server in which you are running(will be shown when app is running) in your browser.

7. When you are done using the app, deactivate the virtual environment:
8. When you are done using the app, deactivate the virtual environment:
```
deactivate
```
Expand Down
8 changes: 0 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@ asn1crypto==0.24.0
attrs==19.3.0
awsebcli==3.14.1
bcrypt==3.1.7
black==19.3b0
blessed==1.15.0
blinker==1.4
botocore==1.10.48
cached-property==1.4.3
cement==2.8.2
certifi==2018.4.16
chardet==3.0.4
click==6.7
colorama==0.3.9
coverage==4.5.1
cryptography==2.8
docker==3.4.0
docker-compose==1.21.2
docker-pycreds==0.3.0
dockerpty==0.4.1
docopt==0.6.2
docutils==0.14
Expand All @@ -43,7 +37,6 @@ Mako==1.1.3
MarkupSafe==1.1.1
mccabe==0.6.1
paramiko==2.7.1
pathspec==0.5.5
psycopg2-binary==2.8.5
pycodestyle==2.5.0
pycparser==2.18
Expand All @@ -57,7 +50,6 @@ python-editor==1.0.4
pytz==2018.4
PyYAML==3.13
regex==2020.2.20
requests==2.18.4
semantic-version==2.5.0
six==1.11.0
SQLAlchemy==1.2.7
Expand Down

0 comments on commit 5ceb31f

Please sign in to comment.