I have to install py4jdbc module in python on windows 10, but i am having the followings errors when i try to use pip install py4jdbc or from the source:
Error 1: "The executable sbt cannot be found"
Pip Error
Error 2: "the file doesn't exist..."
Error From source
I have sbt already install and in the path.
Is there something i am missing?
It seems py4jdbc was not tested on Windows as it uses a function distutils.spawn.find_executable that on w32 looks only for sbt.exe while you have sbt.bat.
My advice is to try to fix py4jdbc. Download it with pip download py4jdbc (it also downloads dependency py4j), unpack the archive py4jdbc-0.1.6.8.tar.gz and edit setup.py: at line 28 replace 'sbt' with 'sbt.bat'. Install with pip install . (<- the dot at the end means "the current directory".)
Related
i have installed the youtube-dl module via pip with pip install youtube-dl and it worked. I can use it in CMD but for some weird Reason Python says that the Module doesnt exist:
Extension 'cogs.music' raised an error: ModuleNotFoundError: No module named 'youtube_dl'
this problem usually happens when there is more than one python version on the computer, download the modules according to the version you want to use
if this is didn't work for us do like bottom steps
go your python libs path and look up you must got this ........\lib\site-packages\youtube-dl
if you havn't got, go pypi site and download packets
after that, take out this file to ......\lib\site-packages
you should see like this :
or you can do like this:go your python path and open cmd and start writing:
......\python.exe -m pip install youtube_dl
Try the following command.
pip3 install --upgrade youtube-dl
$ python -m pip install pyaudio
Requirement already satisfied: pyaudio in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (0.2.11)
$ py sound.py
Traceback (most recent call last):
File "sound.py", line 1, in <module>
import pyaudio
ModuleNotFoundError: No module named 'pyaudio'
pyaudio was installed via a .whl file. This is on Windows 10, python version 3.8.5
this mostly happens if you have installed two python versions.
here you are using "python". $ python -m pip install pyaudio
and to execute you are using "py". $ py sound.py
run it using python sound.py
Visit this link https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio and download the corresponding wheel to your python version, then type "pip install {the wheel you installed}", if this doesn't work then make sure you moved the wheel from Downloads to your terminal path
I could resolved PyAudio error after a long search
Hope this can help someone doing speech text recognition and trying to install PyAudio :
First you find the python version using : python --version (check both Pycharm and JupyterLab as I had 3.7.6 and 3.10.4 different version and move to correct directory - I pasted the same version whl file in same directory "may be there is another way of doing it - suggestions welcome" )
Once this file is placed in the same directory - "PyAudio-0.2.11-cp37-cp37m-win_amd64.whl" you can use pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl directly
Other findings :
In case the version and file not matching you will get this error
ERROR: PyAudio-0.2.11-cp310-cp310-win32.whl is not a supported wheel
on this platform.
simple pip install pyaudio will not work (As read on internet its not working beyond 3.6)
Go to 'file' tab> then 'settings' option> then in the search bar look for 'Python Interpreter', Open that.
There u will have an option of adding a package, one somewhat like this '+' sign. Click over it and then many packages will show up. There either type or search for 'PyAudio' and then click the 'Install Package' button.
You are done then.
Good to go!!
To solve it:
open "Command Prompt" and type cls.
click on this Link (https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio)
install a package based on your version of python and choose either 32 or 64 bit.
after the download type cd download in "Command Prompt"
press "Enter"
then type pip install py
finally click on "tab", then "Enter".
Your pyaudio is installed!
Suppose I have a python package in following directory:
c:\Python27\site-package\monster
I want to change it to local branch:
c:\ddey\dev
I went to the directory c:\ddey\dev where I have \monster developer package
and tried: pip install -e .
But it isn't changing the path. How do I know?
in python I tried following:
>>>import monster
>>>print(monster.__file__)
c:\Python27\site-package\monster\__init__.pyc
expected:
>>>import monster
>>>print(monster.__file__)
c:\ddey\dev\monster\__init__.pyc
solution:
previously my pip install was getting completed but I never getting the following message at the end of it as shown below. There was an issue with a package during the operation which I didn't notice as pip install wasn't giving a clear error.Once I fixed the issue with the package, the installation worked fine and got expected result!
Successfully installed monster
Try using pip install --target=d:\path\not_default package_name
I am using Python2.7.10 on a Windows10 machine, and wish to install pip.
I followed the instructions from here to get the get-pip.py file, but when I try to run it I get the following error:
Could not install packages due to an EnvironmentError: [Errno 42] Illegal byte sequence
I found that if I install an older version of pip (for Python2.6) then the installation is successful, and I can use pip regularly. If I try to use this older version (9.0.3) to install the newer one (18.0) then I get the same error message.
The complete log of the installation is below (1). If I manually install setuptools then I get the same message when it tries to download the next package:
Any assistance with installing the newer version will be much appreciated :-)
1)
C:\Python27\Lib\site-packages>python get-pip.py
Collecting pip
Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/ff/f4/385715ccc461885f3cedf57a41ae3c12b5fec3f35cce4c8706b1a112a133/setuptools-40.0.0-py2.py3-none-any.whl (567kB)
1% |Could not install packages due to an EnvironmentError: [Errno 42] Illegal byte sequence
Update: after installing several packages manually I was able to install the new pip version. It obviously didn't solve the problem, and pip is still not working. When trying to use it, the same error message appears at every attempted download. See log at (2). I double checked the address, and it appears to be correct.
2)
Collecting Requests
Downloading https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl (91kB)
11% |Could not install packages due to an EnvironmentError: [Errno 42] Illegal byte sequence
Thanks
tl;qr - add the quiet flag (-q) to your command
While trying to debug I redirected the output to a file:
python -m pip install requests > .\temp.txt
Surprisingly, everything suddenly worked!
It appears there is a known bug (Thanks Matan M) while displaying the progress bar to the console. Basically, any solution that would avoid writing it would work.
Here are some options:
Use the -q flag
Turn off the progress bar using --progress-bar off
Redirect to a temp file
:-)
Hi check if you added the relevant python paths to the PATH.
pip install <package> -q **or**
--progress-bar off
I am having trouble installing a wheel file via pip.
I open my command prompt
write the following in the prompt
C:/Python34/Scripts/pip install C:/Users/Hamsa/Downloads/pygame.whl
Then I get this message
pygame.whl is not a valid wheel filename. Storing debug log for failure in C:\Users\Hamsa\pip\pip.log
I don't what to do and I need your help.
You should correct name format for installing wheel file. Because wheel file name also includes many information such as the version of program, supported python version. Your command should be like the command below.
pip install pygame‑1.9.3‑cp34‑cp34m‑win_amd64.whl
If the answer suggested by #Harun doesnot work, try
python -m pip install <whl file name with complete path>.whl
If u have more than 1 Python versions installed , check which version of python is being used to install the package using:
python -v
Also refer to pygame readme for an official installation guide.