mirror of
https://github.com/ciur/papermerge.git
synced 2026-04-25 03:55:58 +03:00
[GH-ISSUE #283] cannot import name 'six' from 'django.utils' #231
Labels
No labels
2.1
3.0
3.0.1
3.0.2
3.0.3
3.0.3
3.1
3.2
3.2
3.3
3.5
3.x
Fixed. Waiting for feedback.
Fixed. Waiting for feedback.
UX
Version 2.1 - alpha
XSS
announcement
beta
blocker
bug
cannot reproduce
confirmed
confirmed
critical
demo
dependencies
deployment
detchnical debt
discussion
docker
documentation
donations
duplicate
enhancement
feature request
frontend
fundraising
good first issue
good issue
help wanted
high
implemented
important
improvement
incomplete
invalid
investigation
kubernetes
low
low impact
medium
medium
medium impact
migration from 2.0
migration from 2.1
missing-language
missing-ocr-language
no-activity
note
ocr
outofscope
packaging
performance
popular request
pull-request
pypi
question
raspberry pi
roadmap
search
security
setup
status
task
technical debt
updates
user xp
version 1.4.0 - demo
will be implemented
will not be implemented
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/papermerge#231
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NovaMoon on GitHub (Jan 10, 2021).
Original GitHub issue: https://github.com/ciur/papermerge/issues/283
Trying to install Papermerge the bare metal way on my raspberry pi. when i installed everything according to the guide here https://papermerge.readthedocs.io/en/latest/setup/manual_way.html i get this.
./manage.py migrate
Traceback (most recent call last):
File "./manage.py", line 24, in
execute_from_command_line(sys.argv)
File "/home/pi/Papermerge/.venv/lib/python3.7/site-packages/django/core/management/init.py", line 401, in execute_from_command_line
utility.execute()
File "/home/pi/Papermerge/.venv/lib/python3.7/site-packages/django/core/management/init.py", line 377, in execute
django.setup()
File "/home/pi/Papermerge/.venv/lib/python3.7/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/pi/Papermerge/.venv/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/home/pi/Papermerge/.venv/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/pi/Papermerge/.venv/lib/python3.7/site-packages/knox/models.py", line 5, in
from knox import crypto
File "/home/pi/Papermerge/.venv/lib/python3.7/site-packages/knox/crypto.py", line 7, in
from knox.settings import CONSTANTS, knox_settings
File "/home/pi/Papermerge/.venv/lib/python3.7/site-packages/knox/settings.py", line 5, in
from rest_framework.settings import APISettings, api_settings
File "/home/pi/.local/lib/python3.7/site-packages/rest_framework/settings.py", line 27, in
from django.utils import six
ImportError: cannot import name 'six' from 'django.utils' (/home/pi/Papermerge/.venv/lib/python3.7/site-packages/django/utils/init.py)
@ciur commented on GitHub (Jan 10, 2021):
@NovaMoon
That guide you mentioned above is for Ubuntu 20.04 LTS or Debian compatible system.
I know that there are persons who successfully run Papermerge on raspberry pi.
This issue is definitely not a bug.
@francescocarzaniga commented on GitHub (Jan 11, 2021):
@NovaMoon You probably had installed Django's RestFramework previously on your Pi, so you are stuck with an old version incompatible with Django 3.1.
I would suggest removing your current Papermerge installation and following the tutorial again, running
python3 -m venv .venvinstead ofpython3 -m venv .venv --system-site-packages.I believe this should be changed in the setup guide as well @ciur. There are very few reasons why a virtualenv should be initialised with system packages, and it usually causes more problems than it solves by summoning old cruft from the system.
@NovaMoon commented on GitHub (Jan 11, 2021):
this was the solution and everything works now. thanks a lot! i was indeed summoning old cruft.