How to rectify pip3 file not found error? - python

I have installed python 2 and 3 and also have added the path to system variables. Everything except pip3 is working fine. Pip3 shows a error stating file is not found. Given below is the result I get on command line
Any direct pip3 command shows "The system cannot find the file specified". But if executed with "python3 -m" at the beginning then it runs fine. How can this be fixed so that pip3 can be accessed directly.
C:\Users>python3 -m pip --version
pip 20.1.1 from D:\Software\Python38\lib\site-packages\pip (python 3.8)
Python 2
C:\Users>python2
Python 2.7.18 <v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05> (MSC v.1500 64 bit <AMD64>] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>> quit<>
C:\Users>pip2 —-version
pip 20.2.3 from d:\software\python27\lib\site-packages\pip (python 2.7)
Python 3
C:\Users>python3
Python 3.8.5 <tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit <Intel>] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>> quit<>
C:\Users>pip3 —-version
Fatal error in launcher: Unable to create process using "d:\software\python38\python.exe" "D:\Software\Python38\Scripts\pip3.exe" —-version’: The system cannot find the file specified.

Related

Which version of pygame is right for me?

I am trying to install pygame. But I am not sure which version is appropriate for me.
I am working on a Windows 10 AMD64 PC.
The version of Python that is installed, shows-
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32
on typing python into the command prompt.
I can find the packages here and here.
But there are only items listed such as-
Download repository
pygame-1.9.2-cp27-cp27m-win32.whl
pygame-1.9.2-cp34-cp34m-win32.whl
pygame-1.9.2-cp35-cp35m-win32.whl
pygame-1.9.2-cp27-cp27m-win_amd64.whl
pygame-1.9.2-cp34-cp34m-win_amd64.whl
pygame-1.9.2-cp35-cp35m-win_amd64.whl
Now I have no idea which one of these is to get.
And, what are the differences among cp27, cp34 and cp35?
Please help me choose my version.
normally you should just type following command
py -m pip install pygame
On non windows system you just type
pip install pygame
and the correct file will be downloaded and installed.
The pip module will consult https://pypi.org to indentify the versions available and choses normally the right one

Unable to do full installation of OpenAI Gym - Unable to create process using '"c:\python37-32\python.exe"

I'm trying to do the full installation of OpenAI Gym, using the command: pip install -e '.[all]'.
However, I get the error:
Fatal error in launcher: Unable to create process using '"c:\python37-32\python.exe" "C:\Python37-32\Scripts\pip.exe" install -e '.[all]''. Anyone knows what this means or came across this issue before?
I'm using Windows 7 (64-bit). Here's the info regarding the Python installed on my computer:
Python 3.5.6 |Anaconda 4.2.0 (64-bit)| (default, Aug 26 2018, 16:05:27) [MSC v.1900 64 bit (AMD64)] on win32
Many thanks in advance for any help.
Try this:
python -m pip install -e '.[all]'

Python 3.6.5_1 installed in incorrect location (Mac OS)

I install python 3.6.5_1 using
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.r
and get
Warning: python 3.6.5_1 is already installed
The currently linked version is 3.7.3
You can use brew switch python 3.6.5_1 to link this version.
I use brew switch python 3.6.5_1 and get
Cleaning /usr/local/Cellar/python/3.6.5_1
Cleaning /usr/local/Cellar/python/3.7.3
4 links created for /usr/local/Cellar/python/3.6.5_1
Typing which python3, there is no output, which python gives
/usr/local/bin/python
and typing python3 gives
-bash: /usr/local/bin/python3: No such file or directory
typing python gives
Python 2.7.15 (default, Nov 27 2018, 21:24:58)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
How do I make sure that the installed python3.6.5_1 is installed at correct location and is the one referred to by python3?
Extra background :
I have been working with OpenCV for around 5 months now, following this installation guide for installing all requirements including python3.6. I was using this version of brew's python instead of mac's one. Recently I had to install FFmpeg, some errors came up, unwittingly I did something (I don't remember, probably unlinked python) and then I wasn't able to install FFmpeg anyway but also this destroyed my workspace. Right now I keep getting the following error everytime I open up terminal:
-bash: /usr/local/bin/python3: No such file or directory
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3 and that PATH is
set properly.
I tried brew install python3 and that solves the above warning for virtualenvwrapper. But it installs python3.7.3, whereas I need python3.6 for tensor flow etc.

Anaconda: "conda update conda" issue

Having difficulties after installing Anaconda 1.9.2 Windows x86-64 on Windows 7 (64-bit).
I already had an install of Python 2.7, so I installed for All Users. I selected "Add Anaconda to my PATH environment variable", but I did not select "Register Anaconda as my default Python 2.7".
Install was successful , but upon attempting to run (as Administrator) "conda update conda" and "conda update ipython" I'm getting the following error:
Traceback (most recent call last):
File "C:\Anaconda\Scripts\conda-script.py", line 2 in
from conda.cli import main
ImportError: No module named conda.cli.
I did a system search and I can't find a single instance of conda.cli on my machine, is there some way the install would've missed this file, or is there something else I should have installed? I've seen this question involving 64-bit Linux Anaconda, but not Windows.
Please check whether you have this folder in your system: C:\Anaconda\Lib\site-packages\conda\cli'.
Also please try to check your python path and attach the logs:
(TEST) C:\anaconda3\Scripts>python
Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 12:30:02) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import os
>>> print(os.sys.path)
['', 'C:\\anaconda3\\envs\\TEST\\python36.zip', 'C:\\anaconda3\\envs\\TEST\\DLLs', 'C:\\anaconda3\\envs\\TEST\\lib', 'C:\\anaconda3\\envs\\TEST', 'C:\\anaconda3\\envs\\TEST\\lib\\site-packages']

Error installing tweepy on windows

I am new to Python and tweepy. I have tried searching for an answer but haven't been able to get this working.
I have Java 6 (can't change to 7, for another project), python 2.7 and I have downloaded and extracted tweepy in my C drive.
Java and python are both in the PATH variables. I am trying to install tweepy and I keep getting this error.
C:\>cd C:\tweepy
C:\tweepy>python
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>setup.py build
File "<stdin>", line 1
setup.py build
^
SyntaxError: invalid syntax
>>> setup.py install
File "<stdin>", line 1
setup.py install
^
SyntaxError: invalid syntax
>>>
Where am I going wrong? Is it a configuration issue?
another way is to use pip (if you have it installed).
run
pip install tweepy
it should work just fine then.
download tweepy and unzip it in Desktop: https://github.com/tweepy/tweepy
2.rename it tweepy
open command prompt and type "cd desktop" then "cd tweepy"
type "python setup.py install"
You can also clone the git repo and do the following:
git clone git://github.com/tweepy/tweepy.git
cd tweepy
python setup.py install
Note: I assumed, you have added python to your PATH variable(if windows: https://www.pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/)
I had the same problem. Despite the fact that I had already installed tweepy using pip install tweepycommand I was getting the "unable to import tweepy error".
I tried installing tweepy.asynchronous by running the following command and everything got fixed.
pip install tweepy[async]

Categories

Resources