Pip is selecting wrong path

I’m using windows 10 and I got rid of python 3.8 and installed 3.7 as the only python version on my system. When trying to install libraries using pip I now get the error: when I checked in the console which -a pip I got: Now when I look for Python in my variable path it is alright… Anyways I can’t figure out how to change the path of pip so the right one is selected… besides its pretty weird that ive uninstalled python and pip multiple times and it still gets it wrong every time during installation. Thanks Answer

Why in my Windows machine I have to write command as “py -m pip install ”module-name“ instead of just writing ”pip install “module-name”?

I am working on python on a windows 8.1 machine. I am a beginner and when I want to install a module or look at the version, I have to write the command such as py -m pip install module-name, instead of just writing pip install module-name. If I have to check for python version I have to writepy –version instead of python –version. Why is this happening in my machine and what is the cause? Please explain. Answer Pip itself is just a Python module, that’s why you can execute pip with the -m flag like this: python -m

pip command not found in virtual env even if file is there

These are the steps I did: Created a virtual env using python3 -m venv myvenv Activate the virtual env using myvenv/bin/activate Run python -m pip install –upgrade pip, to upgrade pip. run pip install -r requirements.txt It throws an error: bash: /Users/vince/Django Projects/test/myvenv/bin/pip: “/Users/vince/Django: bad interpreter: No such file or directory When I tried using pip2 install, it works, why is that so? Is there something I missed? Answer The file /Users/vince/Django Projects/test/myvenv/bin/pip starts with shebang /Users/vince/Django Projects/test/myvenv/bin/python (look it up). The problem is the path contains a space in its name and shebangs are not allowed to have spaces.

pytest requires Python ‘>=3.5’ but the running Python is 2.7.10

I’m trying to install pytest using pip but running into this error: Pretty sure pytest is compatible with python 2. Any reason why I am not able to install it on my machine? As you can see in the error, I am running python 2.7.10 and do not have issue installing other packages. Answer Quoting the changelog: The 4.6.X series will be the last series to support Python 2 and Python 3.4. Therefore, use to install the latest pytest version that supports Python 2.7.

pipenv not consistant from local to server

Im using pipenv to manage my dependencies, I have the following command working fine on my local machine: pipenv install –dev but when I run it on the server I get the following error: I have handled pipenv errors before and most were pretty reasonable (clashes between dependency and sub-dependecies), but this one makes less sense to me as I did not specifically installed this package, but rather pipenv added it to the pipfile.lock and it doesnt find that version all together while locally that version is available for some reason. I dont know which dependency is asking for that

Not able to install python modules due to multiple issues

I work behind a corporate firewall. I need pymssql library to use some queries. I try installing via pip, which gives me the error: ‘pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.’ I install openssl as mentioned by multiple answers in this site from https://slproweb.com/products/Win32OpenSSL.html. I get the same error even after installation. I set http_proxy and https_proxy in the system variable and try again. I get the same error I set the above proxies via command prompt and do a pip/easy_install. Same issue I try the –trusted host method in

Pip not working with Python3.6 (Ubuntu 14)

I have a lot of problems that I don’t understand with python and its different versions. I am doing a CS50 Web online course, and I need pip3 for python 3.6 or higher. The case is that I can’t use pip for python 3.6. Under /usr/local/bin I can find different pip files: pip, pip2, pip2.7, pip3 and pip3.4. Anyway, if I run “pip” I get the message bash: /usr/local/bin/pip: /usr/bin/python: defect interpreter. File could been not found. How can I use the pip command in the python3.6 version? For the course project, I should use “pip3 install -r requirements.txt” where

Pip freeze vs. pip list

A comparison of outputs reveals differences: Pip’s documentation states but what is “requirements format,” and why does pip list generate a more comprehensive list than pip freeze? Answer When you are using a virtualenv, you can specify a requirements.txt file to install all the dependencies. A typical usage: The packages need to be in a specific format for pip to understand, which is That is the “requirements format”. Here, django==1.4.2 implies install django version 1.4.2 (even though the latest is 1.6.x). If you do not specify ==1.4.2, the latest version available would be installed. You can read more in “Virtualenv