1

Hope you're doing well, I was trying to work on this django project from github but i could not download all the packages in a virtual environment, it says

(venv) C:\Users\me\Downloads\movie_recommender-master>pip install -r requirements.txt
Unable to create process using 'C:\Users\me\AppData\Local\Programs\Python\Python310\python.exe "C:\Users\me\Downloads\movie_recommender-master\venv\Scripts\pip.exe" install -r requirements.txt'

. I have read through tons of questions in stack over flow but nothing seems to work, I would be very grateful if you could help me here.

My command prompt says this

cizario
  • 3,995
  • 3
  • 13
  • 27
D023
  • 11
  • 1
  • What's the output of `pip --version` – thepylot Oct 25 '21 at 09:45
  • And output of `where pip` and `where python` if you are running Windows? – Branko Radojevic Oct 25 '21 at 09:48
  • Hey guys, @codepylot and @Branko I appreciate the responses the output of `pip --version` is `pip 21.3.1 from C:\Users\me\AppData\Local\Programs\Python\Python310\lib\site-packages\pip (python 3.10)` `where pip` gives the output `C:\Users\me\pip` `C:\Users\me\AppData\Local\Programs\Python\Python310\Scripts\pip.exe` `where python` gives the ouput `C:\Users\me\AppData\Local\Programs\Python\Python310\python.exe` `C:\Users\me\AppData\Local\Microsoft\WindowsApps\python.exe` – D023 Oct 25 '21 at 09:54
  • Have you activated your virtual environment? – Branko Radojevic Oct 25 '21 at 10:19
  • have a look at this [post](https://exerror.com/fatal-error-in-launcher-unable-to-create-process-using/#Solution_3_Just_update_pip) my guess you may need to update `pip` to do that just run this command `pip list` and you will find the full command to update the **local pip** just copy and paste it. – cizario Oct 25 '21 at 10:36
  • @BrankoRadojevic yes sir i did i went into the directory and typed `virtualenv -p python3 venv` and then activated it by `venv\Scripts\activate` i downloaded the project again to do the process again, Here's the link https://imgur.com/a/e1wcwdX I appreciate you taking your time to help me :) – D023 Oct 25 '21 at 10:37
  • @cizario I typed `pip list` and it showed `C:\Users\me>pip list Package Version --------------------------------- ------- backports.entry-points-selectable 1.1.0 distlib 0.3.3 filelock 3.3.1 pip 21.3.1 platformdirs 2.4.0 setuptools 57.4.0 six 1.16.0 virtualenv 20.8.1 wheel 0.37.0` so i tried to upgrade pip but https://imgur.com/a/TeSU4dk – D023 Oct 25 '21 at 11:03
  • @D023, it's clear `pip` is already up to date, in fact I used first to update `pip` when I run this command `py -m venv venv`, `venv` is the python build-in module to create an isolated virtual environment without the need of any 3rd apps/tools. – cizario Oct 25 '21 at 11:22
  • @cizario i dont why im getting `unable to create process` error – D023 Oct 25 '21 at 11:32
  • @D023, i have absolutely no glue but try to create the virtual environment using this command `py -m venv venv` (since you are on windows, note: `py` is located under `c: \Windows` after a successful python install) maybe there a problem with the command `virtualenv -p python3 venv` head over this [answer](https://stackoverflow.com/a/69604088/12368419) – cizario Oct 25 '21 at 11:41
  • What is your working directory where your code is located? – Branko Radojevic Oct 25 '21 at 12:40
  • @BrankoRadojevic it is located at `C:\Users\Joydeep Paul\Downloads\movie_recommender-master` – D023 Oct 28 '21 at 12:00
  • And your virtual environment is in subdirectory venv @D023? – Branko Radojevic Oct 28 '21 at 12:05
  • @BrankoRadojevic Yes sir thats correct – D023 Oct 29 '21 at 08:42

1 Answers1

0

From all answers in comments I would say that it is quite clear - you are not activating your virtual environment or it is not setup correctly.

As I can understand from your text and comments your working directory is:

C:\Users\Joydeep Paul\Downloads\movie_recommender-master

and your virtual environment is at:

C:\Users\Joydeep Paul\Downloads\movie_recommender-master\venv

When you issue this commands:

where pip
where python

they need to point to your virtual environment (after you activate it with activate command) but instead they point to system wide versions:

C:\Users\me\AppData\Local\Programs\Python\Python310\python.exe

So to answer your question, one of the following has happened:

  • your system wide python installation is bad and it does not correctly setup virtual environment in your project
  • you haven't activated your virtual environment (although you say that you did)
  • there is some major issue with your windows installation or privileges

Maybe you can try to deactivate vritual environment issue where python3 statement and then activate it again and try once more where command?

Branko Radojevic
  • 660
  • 1
  • 5
  • 14