Giter Club home page Giter Club logo

Comments (9)

foxmask avatar foxmask commented on July 2, 2024

are you using python 3 ?

from dj-diabetes.

petrk94 avatar petrk94 commented on July 2, 2024

By default on the shared host server is Python -V 2.7
But there is even Python 3.
The problem, Pip seems to choose the older Python version. And I don't know how to use pip with Python3

from dj-diabetes.

foxmask avatar foxmask commented on July 2, 2024

Use pip3 instead ;)

from dj-diabetes.

petrk94 avatar petrk94 commented on July 2, 2024
I have tried, looked good a the beginning, but failed too:
$ pip3 install -r requirements.txt
Collecting arrow==0.12.0 (from -r requirements.txt (line 1))
  Using cached arrow-0.12.0.tar.gz
Collecting Django==2.0 (from -r requirements.txt (line 2))
  Downloading Django-2.0-py3-none-any.whl (7.1MB)
    100% |████████████████████████████████| 7.1MB 92kB/s
Collecting six==1.11.0 (from -r requirements.txt (line 3))
  Downloading six-1.11.0-py2.py3-none-any.whl
Collecting flake8==3.5.0 (from -r requirements.txt (line 4))
  Downloading flake8-3.5.0-py2.py3-none-any.whl (69kB)
    100% |████████████████████████████████| 71kB 4.7MB/s
Collecting python-dateutil (from arrow==0.12.0->-r requirements.txt (line 1))  Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
    100% |████████████████████████████████| 194kB 1.2MB/s
Collecting pytz (from Django==2.0->-r requirements.txt (line 2))
  Downloading pytz-2017.3-py2.py3-none-any.whl (511kB)
    100% |████████████████████████████████| 512kB 1.1MB/s
Collecting mccabe<0.7.0,>=0.6.0 (from flake8==3.5.0->-r requirements.txt (line 4))
  Downloading mccabe-0.6.1-py2.py3-none-any.whl
Collecting pycodestyle<2.4.0,>=2.0.0 (from flake8==3.5.0->-r requirements.txt (line 4))
  Downloading pycodestyle-2.3.1-py2.py3-none-any.whl (45kB)
    100% |████████████████████████████████| 51kB 4.8MB/s
Collecting pyflakes<1.7.0,>=1.5.0 (from flake8==3.5.0->-r requirements.txt (line 4))
  Downloading pyflakes-1.6.0-py2.py3-none-any.whl (227kB)
    100% |████████████████████████████████| 235kB 2.8MB/s
Installing collected packages: six, python-dateutil, arrow, pytz, Django, mccabe, pycodestyle, pyflakes, flake8
Exception:
Traceback (most recent call last):
  File "/package/host/localhost/python-3.4.6/lib/python3.4/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/package/host/localhost/python-3.4.6/lib/python3.4/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/package/host/localhost/python-3.4.6/lib/python3.4/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/package/host/localhost/python-3.4.6/lib/python3.4/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/package/host/localhost/python-3.4.6/lib/python3.4/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/package/host/localhost/python-3.4.6/lib/python3.4/site-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/package/host/localhost/python-3.4.6/lib/python3.4/site-packages/pip/wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/package/host/localhost/python-3.4.6/lib/python3.4/shutil.py", line 109, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/package/host/localhost/python-3.4.6/lib/python3.4/site-packages/six.py'

from dj-diabetes.

foxmask avatar foxmask commented on July 2, 2024

This error occurs because you are connected as an end-user and try to install files into directories where you dont have the rights.

So first of all start by creating a new virtualenv like this:

python -m venv <the name of virtualenv you want>

then go into that virtualenv

cd <the name of virtualenv you want>

activate the virtualenv by:

source bin/activate

then clone

git clone https://github.com/foxmask/dj-diabetes.git

then install

cd dj-diabetes
pip3 install -r requirements.txt

from dj-diabetes.

petrk94 avatar petrk94 commented on July 2, 2024

ok thanks, this worked now all and the migration was successful.
But now I have it in /var/www/virtual/xxxx/diabetes/dj-diabetes/

How I can run it as subdomain and which commands are necessary to start the python server for this project?

from dj-diabetes.

tylergale avatar tylergale commented on July 2, 2024

I'm assuming you would need some sort of HTTP proxy, such as Nginx? Check https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04

from dj-diabetes.

petrk94 avatar petrk94 commented on July 2, 2024

@tylergale is it even possible without?
This all seems to be very complicated, just to set this up and make it reachable, especially I can not just easily install a Nginx Server on my shared host account.

from dj-diabetes.

foxmask avatar foxmask commented on July 2, 2024

@petrk94 you can install this project on your desktop for your own usage and thus no need to setup NGINX, just start

python manage.py runserver &

and access to the project by http://127.0.0.1:8000/

If you plan to host it on a (shared hosting) server provider without any knowledge, that will be very complicated.

from dj-diabetes.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.