0

I am trying to install to oct2py package to import in my python script. However whenever I run the command pip install oct2py I get the following error:

Fatal error in launcher: Unable to create process using '"c:\python37\python.exe"  "C:\Program Files\Python37\Scripts\pip.exe" ': file cannot be found.

How can I install oct2py?

Gaëtan GR
  • 1,380
  • 1
  • 5
  • 21
Wallflower
  • 550
  • 1
  • 4
  • 13

3 Answers3

1

Found the answer

Deinstalled python and reinstalled it. I checked the environment variable and changed it from this one : 'C:\Program Files\Python39' to this one 'C:\Users\lsee\AppData\Local\Programs\Python\Python39'.

Wallflower
  • 550
  • 1
  • 4
  • 13
0

Is unable to locate your pip installer, easy fix is unusually to either upgrade or test pip :

# to upgrade your pip
python -m pip install --upgrade pip 

pip --version 
# test you have pip in your machine

If your pip version is showing that means you have it installed, it could be a problem activating your virtual environnement, or your path.

It says the file cannot be locate, are you sure your path for Python and pip is correct ?

Gaëtan GR
  • 1,380
  • 1
  • 5
  • 21
  • GR I tried your command `python -m pip install` and got this error `Defaulting to user installation because normal site-packages is not writeable ERROR: You must give at least one requirement to install (see "pip help install")` – Wallflower Jan 18 '21 at 12:11
  • I also checked the environment path, it seems correct to me... – Wallflower Jan 18 '21 at 12:12
  • 1
    Sorry, I made a typo, try ``pip install --upgrade pip `` which OS are you using ? – Gaëtan GR Jan 18 '21 at 12:14
  • I am using Windows 10 – Wallflower Jan 18 '21 at 12:15
  • Try the answer from @frederic, please try upgrading or installing a package, does it fail only with ``oct2py``? Can you output your pip version ? – Gaëtan GR Jan 18 '21 at 12:17
  • GR, problem solved and oct2py installed. However whenever I try to import it in my python script I get the error asked [here](https://stackoverflow.com/questions/65773291/installed-the-oct2py-package-but-is-not-recognized-when-imported?noredirect=1#comment116291409_65773291) – Wallflower Jan 18 '21 at 13:49
0

Try:

python -m pip install oct2py

This should work (as python -m pip install gave not errors)

TheEagle
  • 5,808
  • 3
  • 11
  • 39