I’m working around my company’s firewalls to install Django, meaning that I couldn’t do the direct pip install route. I managed to get the tarball file downloaded and extracted while running cmd as an administrator, but I’m at a complete loss how to get these files in a place where I can be up and running. I can’t do “install” from pip to activate anything and when I create a venv to test whether it recognizes I have django, even when I have the cd directing to the folder that has Django in the site-packages, I get an invalid syntax error whenever I try to do any sort of Django command or test. Any advice?
I’m not a programmer at all, but I really want to learn this.
From your system, you can use the pip wheel Django command to create a wheel file for Django. (It’ll also create wheels for asgiref and sqlparse.) You can then copy those wheel files to the target system and do a pip install Django-4.2.4-py3-none-any.whl (or whatever the name of the file happens to be.)
Thank you, although it didn’t work. I tried clearing the cache and it still didn’t work.
C:\Windows\System32>pip wheel Django
Collecting Django
Downloading Django-4.2.4-py3-none-any.whl (8.0 MB)
---------------------------------------- 0.0/8.0 MB ? eta -:–:–
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
Django from https://files.pythonhosted.org/packages/7f/9e/fc6bab255ae10bc57fa2f65646eace3d5405fbb7f5678b90140052d1db0f/Django-4.2.4-py3-none-any.whl:
Expected sha256 860ae6a138a238fc4f22c99b52f3ead982bb4b1aad8c0122bcd8c8a3a02e409d
Got e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855