Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install Django using pipenv for unknown reason (but can using pip)

I have no idea what is causing this issue, I have tried uninstalling and re-installing everything from scratch, and I still can't solve this after two days of trying. I could really use some expert help.

Am I missing something fundamental here?

On my desktop I am running Windows 10, on my laptop I am running Windows 7 (Professional, SP1).

On desktop, I pipenv to install django==1.11, and pip freeze shows django==1.11 listed. On my laptop, use pipenv to install django==1.10, but pip freeze doesn't list django. When I check pipfile.lock, I see django listed in there.

This is the log from my laptop, so that you can see all the commands I've used (in case I've missed one):

PS C:\Project> pipenv install django==1.11

Creating a virtualenv for this project.
Using C:\Python27\python.exe to create virtualenv.
Running virtualenv with interpreter C:\Python27\python.exe
New python executable in C:\Project\Scri...
xe
Installing setuptools, pip, wheel...done.

Virtualenv location: C:\Project\
Installing django==1.10.
Collecting django==1.10
  Using cached Django-1.10-py2.py3-none-any.whl
Installing collected packages: django
Successfully installed django-1.10

Adding django==1.10 to Pipfile's [packages]
Locking [dev-packages] dependencies.
Locking [packages] dependencies.
Updated Pipfile.lock (93acb4)!

PS C:\Projects> cat pipfile

[[source]]

url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[dev-packages]
[packages]    
django = "==1.10"

PS C:\Project> cat pipfile.lock

{
    "_meta": {
        "hash": {
            "sha256": "92bc94ea06d9cf8e2f7b9ed1628d1036db1bce0bb20f920009e9f6dba093acb4"
        },
        "host-environment-markers": {
            "implementation_name": "cpython",
            "implementation_version": "0",
            "os_name": "nt",
            "platform_machine": "AMD64",
            "platform_python_implementation": "CPython",
            "platform_release": "7",
            "platform_system": "Windows",
            "platform_version": "6.1.7601",
            "python_full_version": "2.7.14",
            "python_version": "2.7",
            "sys_platform": "win32"
        },
        "pipfile-spec": 6,
        "requires": {},
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.python.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "django": {
            "hashes": [
                "sha256:9c60f4a801bf7c26bd6824c1062550c12c373344116703461c18cc258f8c9320",
                "sha256:46b868d68e5fd69dd9e05a0a7900df91786097e30b2aa6f065dd7fa3b22f7005"
            ],
            "version": "==1.10"
        }
    },
    "develop": {}
}

PS C:\Project> pip freeze

backports.shutil-get-terminal-size==1.0.0
certifi==2018.1.18
chardet==3.0.4
configparser==3.5.0
enum34==1.1.6
flake8==3.5.0
idna==2.6
mccabe==0.6.1
pathlib==1.0.1
pew==1.1.2
pipenv==9.0.3
psutil==5.3.1
pycodestyle==2.3.1
pyflakes==1.6.0
requests==2.18.4
shutilwhich==1.1.0
urllib3==1.22
virtualenv==15.1.0
virtualenv-clone==0.2.6

PS C:\Project> django-admin startporject project

The term 'django-admin' is not recognized as the name of a cmdlet, function, script file, or operable program. Check th
e spelling of the name, or if a path was included, verify that the path is correct and try again.

I've tried disabling Avast (it kept popping up with a "hold on while we scan that" notification whenever I installed a new package)

I did notice Using cached Django-1.10-py2.py3-none-any.whl in the beginning of the log - should I try clearing the cache (in case that package is corrupt) and retry?

Am I doing something silly? If not, how do I go about figuring out what the problem is so that I can solve it?

like image 409
user1970728 Avatar asked Dec 09 '25 21:12

user1970728


1 Answers

It sounds like you haven't activated the virtual environment - try pipenv shell then django-admin ...

like image 55
ron_g Avatar answered Dec 11 '25 12:12

ron_g



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!