I am trying to use the makemigrations command and it is giving me a missing module error, how do i fix it? Editing the repo has not been working and I do not know how to change the correct dependencies?
ubuntu@ip-172-31-46-38:~$ cd watermelon_1.0 ubuntu@ip-172-31-46-38:~/watermelon_1.0$ python3 manage.py makemigrations Traceback (most recent call last): File "/home/ubuntu/watermelon_1.0/manage.py", line 22, in <module> main() File "/home/ubuntu/watermelon_1.0/manage.py", line 18, in main execute_from_command_line(sys.argv) File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 416, in execute django.setup() File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/django/apps/config.py", line 193, in create import_module(entry) File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1387, in _gcd_import File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked ModuleNotFoundError: No module named 'generic_relations'
#🔒 I need help migrating my git repo to an AWS EC2 server
25 messages · Page 1 of 1 (latest)
@strong rover
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
`
ubuntu@ip-172-31-46-38:~/watermelon_1.0$ sudo apt install python3-poetry
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
`
worked but then
`
No VM guests are running outdated hypervisor (qemu) binaries on this host.
ubuntu@ip-172-31-46-38:~/watermelon_1.0$ python3 manage.py makemigrations
Traceback (most recent call last):
File "/home/ubuntu/watermelon_1.0/manage.py", line 22, in <module>
main()
File "/home/ubuntu/watermelon_1.0/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/usr/lib/python3/dist-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/usr/lib/python3/dist-packages/django/core/management/init.py", line 416, in execute
django.setup()
File "/usr/lib/python3/dist-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/apps/config.py", line 193, in create
import_module(entry)
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'generic_relations'
ubuntu@ip-172-31-46-38:~/watermelon_1.0$
`
migrations still does not work?
python3 manage.py makemigrations
you need active poetry shell or run command use poetry
poetry python manage.py makemigartions
ubuntu@ip-172-31-46-38:~/watermelon_1.0$ poetry python manage.py makemigartion
The command "python" does not exist.
ubuntu@ip-172-31-46-38:~/watermelon_1.0$
try python3
ubuntu@ip-172-31-46-38:~/watermelon_1.0$ poetry python3 manage.py makemigartion
The command "python3" does not exist.
ubuntu@ip-172-31-46-38:~/watermelon_1.0$
ubuntu@ip-172-31-46-38:~/watermelon_1.0$ python3 -m pip install --user pipenv
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
ubuntu@ip-172-31-46-38:~/watermelon_1.0$
ubuntu@ip-172-31-46-38:~/watermelon_1.0$ sudo apt install python3-pipenv
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python3-pipenv
ubuntu@ip-172-31-46-38:~/watermelon_1.0$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pip is already the newest version (24.0+dfsg-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
ubuntu@ip-172-31-46-38:~/watermelon_1.0$
what is a bash profile?echo ' ' >> ~/.bash_profile
echo '# Pyenv Configuration' >> ~/.bash_profile
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
like my bash profile through git?
Sorry, I really don't have idea
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.