0

I can't seem to figure out how to use pip with Python 3.6. I'm really lost and annoyed because it seems so easy. I've tried changing the path, calling for it in CMD prompt and PowerShell, but nothing seems to work.

When I type -m pip install matplotlib, for example, it says "Can't find a default Python."

3 Answers3

0

try this out:

python3 -m pip install <package-name>

I hope this helps.

NightHowler
  • 167
  • 11
0

You can explicitly put the Python path while running virtualenv.

virtualenv --python=\path\to\python path\to\new\virtualenv\

then

source testenv/bin/activate

You can also adjust the default python version if you have multiple versions using py.exe on Windows using:

py -3
Utkarsh
  • 1,006
  • 10
  • 22
0

If I understand correct you are using windows. In that case, make sure that you have definend python path in Environment Variables and then make sure that you have installed pip in your system, for that check with this How do I install pip on Windows? here is good tut on how to do that. After that if you still can't use pip install <package-name> in cmd make sure that you have no restrictions on your proxy, if you have, then you could try to create pip.ini file wich would bypass you'r proxy settings, I have it like this:

Set path:

C:\Users\userName\pip # here create pip catalog

Then create pip.ini file inside pip catalog.

Then create configs:

[global]
strict-ssl=false
always-auth=false
proxy=http://proxyOfYoursUrl:8080/
trusted-host=pypi.python.org

This should help using pip thru cmd.

simkusr
  • 622
  • 1
  • 11
  • 16