I'm trying to follow the tutorial on here: http://pythonhosted.org/airflow/tutorial.html
but i'm using a mac, and so i had to install python via brew, which then comes with pip, which i used to install airflow. However, that didn't quite work either, so i then tried to create a virtualenv for which i tried to install airflow and it is still giving me this ImportError: No module named mako.util
not sure if it matters, but here's my setup:
(airflow) [davidtian: airflow]$ python --version
Python 2.7.12
(airflow) [davidtian: airflow]$ pip --version
pip 8.1.2 from /Users/someone/Desktop/blah/airflow/airflow/lib/python2.7/site-packages (python 2.7)
(airflow) [davidtian: airflow]$
How do i install this mako.util module?
Finally figured it out. after trying a bunch of things. for one, the python that comes with Mac apparently doesn't work very well. you have to brew install python instead. with that python, it comes with pip by default
i had to actually sudo pip uninstall airflow and then install it again.
Related
I've installed appium on my system and use:
from appium import webdriver
by python3.6.
but in other code when I use it by python3.8 return me:
ModuleNotFoundError: No module named 'appium'
what's the problem with this error?!
The basic crux of the problem is that those 2 python versions are not accessing the same location of installed pip modules. Try using the python -m pip install SomePackage method to call pip of specific Python Binary.
This snippet will help.
python38 -m pip install Appium-Python-Client
Not sure, how you manage those versions of python, but the basic gist of invoking specific pip version works.
Try whereis pip or which pip to ensure the correct pip is being called.
After running pip3 install python-telegram-bot in command prompt, I get 'telegram' module is not found when I run python -m telegram after the installation.
I have Python 3.9 and 3.10.1 installed, and it seems like the package is installed in the Python 3.9 directory as the output during the installation shows ...pythonsoftwarefoundation.python.3.9
I am new to programming, so I am at a lost as to how to install it for Python 3.10.1. Appreciate any guidance I can get.
Since you installed the module through pip3 there is a chance you just need to use python3. Try python3 -m telegram.
Opposite it might be that you need to use pip install python-telegram-bot for it to work with python.
Usually pip is linked to python and pip3 is linked to python3 but it is only a guideline, not a rule.
If that doesn't work you can always invoke pip for the other python binary with python -m pip install python-telegram-bot
I am on a MAC OS 10.15.6
I am having a tough time with virtualenv for python3.
The error I keep getting
ModuleNotFoundError: No module named 'virtualenv.seed.via_app_data'
It pops up when I run the following command (among others)
python3 -m virtualenv
What I have tried
Pip installing virtualenv with sudo
Regular pip install, normal permissions
Using the pip install --user option
Trying older versions of virtualenv (20.0.23)
Trying newer version of virtualenv (20.0.31)
Any leads are appreciated.
Exactly same problem!
I uninstalled virtualenv, and now it works!
pip uninstall virtualenv
I don't know why
Maybe python now comes with a built-in version of virtualenv?
I'm on python 3.8
TL;DR: a package is installed under pip3, but it cannot be found under Python3. Why?
All of this is happening in my anaconda base environemnt:
So I've been struggling with tensorflow and its versions (another post coming up).Turns out version 2.1 is only available at pip and not with conda install. So after upgrading pip3 install --upgrade pip I install pip3 install tensorflow==2.1.0. I open Jupyer-Notebook afterwards, and turns out tensorflow is not installed(running Python3). I check from the terminal first for the version, and then to uninstall tensorflow. It is not installed under pip (as expected) but it is indeed installed under pip3. I also get this message when uninstalling via pip3:
"pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly."
which might be related. I was under the impression that pip installs packages for the default python (3.7.4 in my case) but pip3 installs them only for Python3. What am I missing?
Thanks!
a package is installed under pip3, but it cannot be found under Python3. Why?
Because you have many different Pythons. pip doesn't install packages for all Pythons; pip3 doesn't install packages for Python3. They install packages for that particular Pythons they're running under. You cannot expect to install a package with one Python and import it in another eve if they're of the same version.
To see what Python is used with a particular pip see its shebang:
head -1 $(which pip)
head -1 $(which pip3)
If the shebang is #!/usr/bin/env python continue investigating with which python (or which python3).
Finding the Python run python -m site to see where from the packages are imported.
I installed graph-tool on ubuntu. When trying to import it in iPython I get an error:
ImportError: No module named graph_tool.all
As I read in other posts it might be possible that I used a different version of python for installing graph-tools than the system version I'm using. My question is now, how do I check which version graph-tool is installed with and how do i change this in order to import it?
Thanks for any advice!
If you install using pip you can check
pip -V
result (for example)
pip 8.0.2 from /usr/local/lib/python3.5/dist-packages (python 3.5)
You should have pip, pip2, pip2.7, pip3, pip3.4, etc. to install with different Python.
(in bash write pip and press tab twice to see all programs started with pip)