'import fiftyone'
import fiftyone as fo
import fiftyone.zoo as foz
dataset = foz.load_zoo_dataset("quickstart")
session = fo.launch_app(dataset)
i tried to install zoo and fiftyone.zoo and install just fiftyone and i upgrade pip and i install it from pycharm interpreter but it gave me the same error massage
Just to clarify, you can install FiftyOne and all subpackages like so:
pip install fiftyone
The install docs have some troubleshooting tips if there is actually an install issue.
However, I suspect you have a folder named fiftyone/ or script named fiftyone.py in your current working directory. This would confuse Python and cause the wrong thing to be imported when you import fiftyone.
Try deleting those or moving to a different directory. Then import fiftyone.zoo should work.
I created a python module and installed it.
pip3 install amnilogger.0.1.3.tar.gz
I confirmed it got installed by using pip3 list
pip3 list
- output:
Amnilogger 0.1.3
but when I'm trying to import it, it says module not found
import Amnilogger # no module
I am new in python and I am trying to import polyglot module in my code. I have installed polyglot explained in Polyglot Installation, everything went good but it still gives me the same error.
ModuleNotFoundError: No module named 'polyglot.text'; 'polyglot' is not a package
When I checked polyglot in my drive, it has been installed inside directory
D:\Anaconda\Lib\site-packages\polyglot-16.7.4-py3.7.egg\polyglot
which has all the needed function in my code.
I need to know where is the problem? and I need to solve it!
I need to import the following functions:
from polyglot.transliteration import Transliterator
from polyglot.mapping import Embedding
from polyglot.load import load_embeddings
Try installing:
pip install polyglot numpy morfessor pycld2 pyicu
I'm calling tide in the pytides module with Python3.7, which is installed using the pip method.Here is my python code:
from pytides.tide import Tide
I ran into the following problems:
ModuleNotFoundError: No module named 'tide'
What should I do to solve this problem?
This is my link to the petides installation package, and you can see the full code here
enter link description here
I think you should you
from pytides import Tide
It will work, correct me if it doesn't
Edit 1:
sudo apt-get install liblapack-dev libatlas-base-dev gfortran
export LAPACK=/usr/lib/liblapack.so
export ATLAS=/usr/lib/libatlas.so
export BLAS=/usr/lib/libblas.so
pip install numpy
pip install scipy
pip install pytides
It is a problem in \site-packages\pytides\__init__.py
You need to rewrite:
from . import tide
from . import astro
from . import constituent
from . import nodal_corrections
Same problem in \site-packages\pytides\constituent.py
You need to change
from . import nodal_corrections as nc
and you need to add:
from functools import reduce
And again in \site-packages\pytides\tide.py
You need to change:
from .astro import astro
from . import constituent
The pytides is outdated. Use pytides2, the newer version. Other thing to keep in mind is,if your interpreter is miniconda/anaconda, then you can't obtain it from their repository. You must create a 3.7 (and no later version) interpreter in pycharm using python3 (real or virtual environment, either is fine).
I installed a new module and it appears as if one of its dependencies was not already installed. The module is called Xlib.display.
Here is the error message I received:
from Xlib.display import Display
ImportError: No module named Xlib.display
Where can I find this module that I am apparently lacking? Google yielded no leads.
"Edit: I already have that sourceforge module downloaded but I still get the same results.
Please try.
This shall install Xlib
sudo apt-get install python-xlib
Then you can check
>>from Xlib.display import Display
To install PyMouse if you want to control and capture mouse events please use:
sudo easy_install https://github.com/pepijndevos/PyMouse/zipball/master
Below worked for me!
pip install python3_xlib
I have also used pyuserinput for automation which requires this.
I was having the same problem, but the solutions above didn't work for me. Since I had installed python through the anaconda package, when I used:
sudo apt-get install python-xlib
Xlib was still undetectable by python2. The solution in my case was to use:
anaconda search -t conda python-xlib
Then find the package from the anaconda api, mine was erik/python-xlib. Install it using:
conda install --channel https://conda.anaconda.org/erik python-xlib
Then it worked.
On Debian systems install python-xlib.
On other systems there's a high probability that the package carries the same name.
I don't think the Xlib library works in Python 3.
Source:
Requirements
The Python X Library requires Python 1.5.2 or newer. It has been tested to various extents with Python 1.5.2 and 2.0 through 2.6.
I honestly cant explain why this works... but here is the command that got it working for me.
sudo apt-get install python3-xlib
Should not work because xlib apparently does not work with python 3.x, but everything installed alright, so I'm not complaining!
I was looking for the same answer, however after some more digging it seems that XCB (X protocol C-language Binding) will obsolete Xlib in general. From the XCB website:
The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility.
Fortunately there are python bindings available as python-xpyb in apt or xpyb on PyPi. I've not gotten that far in my project so I haven't tested if this works with Python3, but this is probably the way to go and the proper place to file any Python3 support bugs if necessary.
Scenario:
I was trying to use screenshot functionalities of pyautogui package. I was getting this error:
Traceback (most recent call last):
File "test_screenshot.py", line 1, in <module>
import pyautogui
File ".../miniconda3/envs/myenv/lib/python3.7/site-packages/pyautogui/__init__.py", line 152, in <module>
from . import _pyautogui_x11 as platformModule
File ".../miniconda3/envs/myenv/lib/python3.7/site-packages/pyautogui/_pyautogui_x11.py", line 7, in <module>
from Xlib.display import Display
ModuleNotFoundError: No module named 'Xlib'
Python code (test_screenshot.py):
import pyautogui
img = pyautogui.screenshot('test.png')
Environment:
Ubuntu 16.04 (LTS)
conda 4.5.11
Python 3.7 (Miniconda)
requirements.txt:
certifi==2019.3.9
Pillow==5.4.1
PyAutoGUI==0.9.42
PyGetWindow==0.0.4
PyMsgBox==1.0.6
PyRect==0.1.4
PyScreeze==0.1.20
PyTweening==1.0.3
Solution:
I installed python-xlib package in the conda environment using:
pip install python-xlib
Now test_screenshot.py is running without any error.
Updated requirements.txt:
certifi==2019.3.9
Pillow==5.4.1
PyAutoGUI==0.9.42
PyGetWindow==0.0.4
PyMsgBox==1.0.6
PyRect==0.1.4
PyScreeze==0.1.20
python-xlib==0.25
PyTweening==1.0.3
six==1.12.0