title: Host Private Pip Repository
body: <p>I am trying to host my private python package in aws ec2. I use flask app for this. I placed my package inside a folder in the root of the flask app. In the route function, after successful aunthentication, i am trying to send the file using send_file. when i try the url with my browser, the response is the attachment of my package. But when i try to install using pip</p>
  <p>pip install mypackage --extra-index-url=https://myurl</p>
  <p>I am getting the following error :
  Could not find a version that satisfies the requirement packagename (from versions: none)
  No matching distribution found</p>
  <p>Pip expects the response from the url to be in 'text/html' format. Initially, i was getting an error that  the response is of type octset, but i changed the mimetype. eventhough somehow i am unable to get the package downloaded.</p>
  <p>also, i tried with PEP503 directory structure,</p>
  <ul>
  <li>simple
  -packagename
  <ul>
  <li>index.html
  -index.html</li>
  </ul>
  </li>
  </ul>
  <p>In this case, what should my url return?. render the index.html? or link to the file?</p>
  <p>Directory structure in Ubuntu AMI:
  directory1</p>
  <ul>
  <li>package-name
  <ul>
  <li>package.name-0.0.0-py3-none-any.whl</li>
  </ul>
  </li>
  <li>app.py</li>
  <li>templates</li>
  <li>static</li>
  </ul>