Johnny_Art
Johnny_Art

Reputation: 21

how can i solve this pipenv install error - django project on vscode

I'm trying to create a platform website with login, CRUD etc. by following a course from Mosh and am stuck on [Part 1 of the Django class -> Django ORM -> 3-Resetting the Database]

On this class, Mosh wants to make sure that we are on the same page, so he tells us to drag and drop into VSCode a specific folder (that contains the django project) that he makes it available at the beginning of the course.

I followed all the steps but, as soon as I tried to run "pipenv install" on my terminal (as he tells us to right after dropping that folder), I get the following error message:

Installing dependencies from Pipfile.lock (f41128)...
An error occurred while installing asgiref==3.3.4; python_version >= '3.6' --hash=sha256:d1216dfbdfb63826470995d31caed36225dcaf34f182e0fa257a4dd9e86f1b78 --hash=sha256:92906c611ce6c967347bbfea733f13d6313901d54dcca88195eaeb52b2a8e8ee! Will try again.
An error occurred while installing django==3.2.4 --hash=sha256:66c9d8db8cc6fe938a28b7887c1596e42d522e27618562517cc8929eb7e7f296 --hash=sha256:ea735cbbbb3b2fba6d4da4784a0043d84c67c92f1fdf15ad6db69900e792c10f! Will try again.
An error occurred while installing django-debug-toolbar==3.2.1 --hash=sha256:e759e63e3fe2d3110e0e519639c166816368701eab4a47fed75d7de7018467b9 --hash=sha256:a5ff2a54f24bf88286f9872836081078f4baa843dc3735ee88524e89f8821e33! Will try again.
An error occurred while installing mysqlclient==2.0.3 --hash=sha256:71c4b330cf2313bbda0307fc858cc9055e64493ba9bf28454d25cf8b3ee8d7f5 --hash=sha256:f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432 --hash=sha256:fc575093cf81b6605bed84653e48b277318b880dc9becf42dd47fa11ffd3e2b6 --hash=sha256:3381ca1a4f37ff1155fcfde20836b46416d66531add8843f6aa6d968982731c3 --hash=sha256:0ac0dd759c4ca02c35a9fedc24bc982cf75171651e8187c2495ec957a87dfff7! Will try again.
An error occurred while installing pytz==2021.1 --hash=sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798 --hash=sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da! Will try again.
An error occurred while installing sqlparse==0.4.1; python_version >= '3.5' --hash=sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8 --hash=sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0! Will try again.
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 6/6 — 00:00:03
Installing initially failed dependencies...
[pipenv.exceptions.InstallError]: Collecting asgiref==3.3.4
[pipenv.exceptions.InstallError]:   Using cached asgiref-3.3.4-py3-none-any.whl (22 kB)
[pipenv.exceptions.InstallError]: Installing collected packages: asgiref
[pipenv.exceptions.InstallError]: ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/Users/jart/.local/share/virtualenvs/storefront-i8ah_EvC/lib/python3.9/site-packages/asgiref'
[pipenv.exceptions.InstallError]: Check the permissions.
ERROR: Couldn't install package: asgiref
 Package installation failed...
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py:1052: ResourceWarning: subprocess 56425 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.FileIO name=14 mode='rb' closefd=True>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.FileIO name=17 mode='rb' closefd=True>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
  ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 5/6 — 00:00:04
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py:1052: ResourceWarning: subprocess 56421 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=5 encoding='utf-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=8 encoding='utf-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py:1052: ResourceWarning: subprocess 56422 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=7 encoding='utf-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=10 encoding='utf-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py:1052: ResourceWarning: subprocess 56423 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=9 encoding='utf-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=13 encoding='utf-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py:1052: ResourceWarning: subprocess 56424 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=11 encoding='utf-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=15 encoding='utf-8'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback

So, what could it be and how can i fix it?

I tried to google it - with no success. I am using python 3.10 and also tried to use the same version as Mosh (3.9.5), which didn't work either. I honestly don't know what to do anymore.

Upvotes: 2

Views: 3923

Answers (3)

Heimir sn&#230;r
Heimir sn&#230;r

Reputation: 1

I had the same problem but I ended up going into Pipfile and deleting [requires] python_version = "3.9" then everything worked. Ps I'm on windows

Upvotes: 0

HowToNoob
HowToNoob

Reputation: 33

I've been struggling with the same issue at the exact same place of the course. I began with Python 3.10 then switched to 3.9 like Mosh did then installed/uninstalled several times just to try and get a fresh start. Nothing worked until I found that my virtual environments were in a folder C:\Users\USER.virtualenvs\ and deleted them all. After this "pipenv install" worked fine. Hope this helps!

Upvotes: 0

Utku Mutlu
Utku Mutlu

Reputation: 13

Have you tried installing pipenv externally?

The link below will help you.

My personal suggestion is that if you are going to use python & django or any of their frameworks or libraries, you should choose linux or mac os as the operating system. In Windows, annoying problems can occur in some places.

This link will help you.

https://pipenv.pypa.io/en/latest/install/

Upvotes: 0

Related Questions