I am using Superset v1.5.1, and trying to use the Forecast option. I ran multiple commands, including:
pip --no-cache-dir install pystan==2.19.1.1 && pip install prophet
or
pip install lunarcalendar tqdm "pystan<3.0" && pip install "prophet>=1.0.1, <1.1
in my Superset container, but still, when I try to use Forecast, it doesn't work.
The error Superset shows is the following:
No results were returned for this query
as seen here
The strange part is that, whenever I don't use it, it works just fine, but the moment I turn on the Forecast, it just gives me 0 rows results and done. I guess it comes from Prophet, but I can't seem to figure out what is missing.
No matter what parameters, or data I give, it just returns 0 rows, every time.
No logs in Superset, install works fine.
Using Druid SQL to query Druid.
Any help would be appreciated.
Here in github it was solved - dependencies were messed up:
#ecederstrand: Preinstalling lunarcalendar, tqdm and pystan is necessary because prophet <= 1.0 has a bug that requires these packages to be available when running setup.py to build the package. This was fixed in prophet 1.1 but that version can't be installed along with superset 2.0 due to a version conflict on the holidays package. I just contributed a fix for that conflict in #21091.
In short, add this to your Dockerfile for Superset:
RUN pip install --upgrade pip
RUN pip install lunarcalendar tqdm "pystan<3.0" && pip install > "prophet>=1.0.1, <1.1"
And it will work.
Related
I was trying to run a Flask project using Python 3.6.
I encountered an error:
...
from flask_openid import OpenID
ModuleNotFoundError: No module named 'flask_openid'
Flask-OpenID is available in my Python v3.5 dist-packages.
(When I run:
"sudo pip3 install Flask-OpenID", it shows
"Requirement already satisfied (use --upgrade to upgrade): Flask-OpenID in /usr/local/lib/python3.5/dist-packages" )
What should I do to install openid for Python 3.6?
The documentation states that you should import OpenID as follows:
from flask.ext.openid import OpenID
The package itself is installed correctly (in your Python3.5 environment), as shown by pip when you try to install it again:
Requirement already satisfied (use --upgrade to upgrade): Flask-OpenID in /usr/local/lib/python3.5/dist-packages
However, as you state the in your question:
I was trying to run a Flask project using Python 3.6
You might want to make sure your python3 and pip3 are actually pointing to where you want them to, e.g. on your terminal:
$ ls -l $(which pip3)
Or even better, you should really look into creating virtualenvs for your projects, it helps a lot avoiding these kinds of problems in the first place:
create a new Python 3.6 virtualenv
activate your new virtualenv
install your requirements with pip inside the virtualenv
Then run your script in this virtualenv, and you'll be sure you are using exactly the Python you want, and your dependencies are where you expect them to be (and only there, not somewhere else messing up other projects).
Now this might look like a lot of effort, but it takes no more than a couple minutes the first time you do it, will quickly become second nature, and save you a ton of headache down the road.
For me,
python3.6 -m pip install flask_openid
solved the issue.
The above command will install openid for python3.6.
I was trying to install tensorflow from source on ubuntu 14.04, python 2.7.
I followed the steps from "tensorflow.org" for source installation.
I had completed all the steps, such as bazel installation, python dependencies installation.
In the final step for sudo pip installation; the command was as follows:-
$sudo pip install /tmp/tensorflow_pkg/tensorflow-1.3.0rc0-cp27-none-linux_x86_64.whl
but i am getting error as follows:
Unpacking /tmp/tensorflow_pkg/tensorflow-1.3.0rc0-cp27-none-linux_x86_64.whl
Downloading/unpacking tensorflow-tensorboard (from tensorflow==1.3.0rc0)
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement tensorflow-tensorboard (from tensorflow==1.3.0rc0)
Cleaning up...
No distributions at all found for tensorflow-tensorboard (from tensorflow==1.3.0rc0)
Storing debug log for failure in /home/ubuntu/.pip/pip.log
i also checked tensorflow_pkg wheel :but the above package was not available there.
so can a different .whl can be insatlled using pip such as -tensorflow-1.2.1-cp27-none-linux_x86_64.whl
which have downloaded in my desktop.
Please tell me how i can resolve this issue.
Thanks and regards
I didn't figure out the root of the problem, but for what its worth I skipped the tensorboard issue by installing an older version (1.2.0 worked for me)
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.2.0-cp27-none-linux_x86_64.whl
Try:
pip install tensorflow
If that doesn't work:
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.2.1-cp27-none-linux_x86_64.whl
More info here and Common problems here.
My issue was resolved by following steps.
I updated the pip using
Also exported proxy settings.
e.g export https_proxy=...
This was able to resolve my issue.
I also tried installing other .whl file for tensorflow and yes tensorflow can be installed using the downloaded .whl file also.
Thank you
I'm on their github page: https://github.com/GoogleCloudPlatform/google-cloud-python
Their first command is pip install --upgrade google-cloud
this gives me:
Collecting google-cloud
Could not find a version that satisfies the requirement google-cloud (from versions: )
No matching distribution found for google-cloud
I downloaded their SDK and which installed their google cloud SDK and I did gcloud init, but I can't seem to have their python library imported into mine. Starting python and typing:
from google.cloud import datastore
gives me an error that it doesn't exist as a module... This is all from their github so I'm not sure what I'm doing wrong
The issue is that the team is trying to transition from gcloud to google-cloud which is still somewhere incomplete.
All you need to do is install gcloud using pip and you should be fine.
Pro Tip: python -m pip install --upgrade gcloud using this command will install it for your python version.
First, make sure you have installed gcloud on your system then run the commands like this:
First: gcloud components update in your terminal.
then: pip install google-cloud
And for the import error:
I had a similar problem. Adding "--ignore-installed" to my pip command made it work for me.
This might be a bug in pip - see this page for more details: https://github.com/pypa/pip/issues/2751
I have a custom pip repository which is used inside my company but not outside. Now every time I'm at home and want to install something eg. pip install pandas it is trying also the "company" repo. Even decreasing the timeout pip still tries multiple times which takes a long time.
What can I do to speed up?
[global]
timeout = 1
extra-index-url = http://foo.bar/packages
trusted-host = pypi-dev.foo.bar
pip will ignore settings in the pip.conf if you run it with the '--isolated' option.
pip install --isolated <package>
I tried to install basemap within Datalab using pip:
%bash
pip install basemap
and got the error:
Downloading/unpacking basemap
Could not find any downloads that satisfy the requirement basemap
Cleaning up... No distributions at all found for basemap
Storing debug log for failure in /root/.pip/pip.log
How do I install extra packages on Datalab if they are not supported by pip?
Use apt-get install. In a cell of your notebook:
%bash
apt-get -y update
apt-get -y install python-mpltoolkits.basemap
Then, remember to restart your kernel (by Reset Session)
Use the following code for this:
%%bash
pip install package_name
You might need to first do
apt-get update
So it gets the updated list of packages.
Basemap doesn't come with the google datalab out of the box.
Note: I use shorthand '!' to indicate a bash command, rather than '%bash' as the google documents usually do.
As of Feb 2019, this works on a fresh google datalab:
Step 1: Install Pre-requisites
!apt-get update && apt-get install -y --allow-unauthenticated build-essential libgeos-3.5.0 libgeos-c1v5 libgeos++-dev
!pip install pyproj pyshp
Step 2: Install the whole package
!pip install https://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz
Step 3: Check the package has been installed correctly
!pip freeze
Step 4: Import the module
from mpl_toolkits.basemap import Basemap
#Lak: You will need to update page 155 of your book - Data Science on the Google Cloud platform as the instructions there won't work; basemap is one of the more difficult packages to get working.
The command suggested by Lak might have worked in the past but it's no longer the case: as of today (Aug 2017) Google Datalab instances reject the command listed here
%bash
echo 'Y' | apt-get install python-mpltoolkits.basemap
outputs the error message:
E: Unable to locate package python-mpltoolkits.basemap
E: Couldn't find any package by regex 'python-mpltoolkits.basemap'
Execution from the shell (vs. notebook) outputs the same error.
After searching various sources I found a fix that worked for me: from the notebook in Datalab I added an update cmd before the actual install, like this:
%bash
echo 'Y' | apt-get update
echo 'Y' | apt-get install python-mpltoolkits.basemap