I running machine learning algo's with theano. I have been getting lot of warnings of DeprecationWarning. coming from numpy package. I want to disable this warnings pls suggest option.
warning nature:fromnumeric.py:932: DeprecationWarning: converting an array with ndim > 0 to an index will result in an error in the future
I tried following run configure added command line option -W ignore or -W ignore::DeprecationWarning but none of this is working
alternatively fixing the warning solution is fine for me. looks like its fixed in theano https://groups.google.com/forum/#!topic/theano-users/Hf7soRrnh8w but I dont know where to find this updated version of theano
I am using Anaconda distribution 2.0.1 windows 8.1 - 64 bit
thanks
See this link to update Theano to the development version. I should be fixed:
http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions
In resume, run one of those 2 command:
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
or (if you want to install it for the current user only):
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git --user
Related
Since I've upgraded my MacOs to Big Sur I'm having some trouble with my data science libraries. I was able to install the numpy and pandas (even though it took an unusual amount of time as stated at this topic). But can't manage to install the Matplotlib.
I've tried three things...
First with the default MacOs embedded Phyton 3.8.2 .
Reinstalled numpy, upgraded pip, but when I've tried to install Matplotlib. I've got the following error:
RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy.
RankWarning: Polyfit may be poorly conditioned
Later, I've seen some suggestions here at stackoverflow for similar problems, one suggested to use homebrew, so I've installed Python 3.9.0 through brew. However, when I've tried to install Matplotlib, still got a giant error, when it was trying to install Pillow:
(.......) The headers or library files could not be found for jpeg,a required dependency when compiling
Pillow from source.Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
ERROR: Command errored out with exit status 1: /usr/local/opt/python#3.9/bin/python3.9 (...)
To finish (in almost despair) I've tried to create a virtual environment using venv (& Python 3.8.2) and was able to install NumPy successfully, however, I've got the following error trying to install Matplotlib:
(...... long line of code....) The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
Really don't know what to do... Is it impossible to use Matplotlib with a clean install on BigSur? hahaha =(
I did it!!! I fix it!!
For this error :
RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend.
If you compiled yourself, see site.cfg.example for information. Otherwise report this to the vendor that provided NumPy.
RankWarning: Polyfit may be poorly conditioned
I fixed installing an older numpy version.
pip3 install --force-reinstall numpy\<1.19
It did the job.
For the second error:
(.......) The headers or library files could not be found for jpeg,a required dependency when compiling
Pillow from source.Please see the install instructions at: https://pillow.readthedocs.io/en/latest/installation.html
ERROR: Command errored out with exit status 1: /usr/local/opt/python#3.9/bin/python3.9 (...)
It was the missing JPEG library. I do recommend you guys install homebrew.
Solved this problem with:
brew install libjpeg
your easy_install is outdated.so just update your setup_tools by excuting following command:
pip install setuptools==51
then
easy_install --version
make sure your easy_install's version is above 51.
I have been trying to run a example code which imports sklearn.When I tried to run it using the latest version I got the below error.
UserWarning: Trying to unpickle estimator pipeline from version 0.21.3
when using version 0.23.1. This might lead to breaking code or invalid
results. Use at your own risk.
And the program stops executing after this.
Many threads suggested that I should use the same version of sklearn which is 0.21.3.
So then I tried uninstalling sklearn and ran this command in my command line.
pip install sklearn==0.21.3
But then I got the error saying ,
Could not find a version that satisfies the requirement
What do I have to do in order to install sklearn 0.21.3 correctly using pip on windows?
Additional info : I am using python 3.7 on windows 10
As Alex stated, you need use to the full name of the module, uppercase is indifferent in this case. Both pip install scikit-learn==0.21.3 or pip install Scikit-learn==0.21.3 will work as I just tested it and I got a successful installation.
I'm trying to install TensorFlow using pip.Python version is 3.7.6 and pip version pip-20.0.2.when I run following line in command prompt
python -m pip install --user tensorflow
after downloading 20% I get the following message and download stopped.
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the
hashes. Otherwise, examine the package contents carefully; someone may
have tampered with them.
tensorflow from https://files.pythonhosted.org/packages/34/d5/ce8c17971067c0184c9045112b755be5461d5ce5253ef65a367e1298d7c5/tensorflow-2.1.0-cp37-cp37m-win_amd64.whl#sha256=7bad8ea686a1f33d9dac13eb578c4597346789d4f826980c8bbcfbd08e7dc921:
Expected sha256 7bad8ea686a1f33d9dac13eb578c4597346789d4f826980c8bbcfbd08e7dc921
Got dc1712222e4d481bf78da6cd0d9337752ed75654981cee3dd0f28523928c5beb
Please provide me some solutions.i am having lots of difficulties.
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 was trying to install keras (for using LSTM) on my Windows 10 system in Anaconda using the method provided by Yelaman. But after running the command pip install git+git://github.com/Theano/Theano.git, I received the following fatal error -
C:\Anaconda>pip install git+git://github.com/Theano/Theano.git
Collecting git+git://github.com/Theano/Theano.git
Cloning git://github.com/Theano/Theano.git to
c:\users\krishna\appdata\local\temp\pip-reettr-build fatal: protocol
error: bad line length character:
Er
Command "git clone -q git://github.com/Theano/Theano.git
c:\users\krishna\appdata\local\temp\pip-reettr-build" failed with
error code 128 in None
I don't have a github account but i use git using bitbucket (if that matters).
Could anyone explain to me what error I am committing and if there is a way out? My main goal is to use keras in Anaconda in Windows.
Thanks!
It seems that the error may be because we have a git repository listed as a dependency. Not still fully sure, though. (Source)
The solution is to replace pip install git+git://github.com/Theano/Theano.git with pip install git+http://github.com/Theano/Theano.git i.e. replacing the second git with http (this works since the repository is public)