importerror

No module named 'Kivy' even though I installed it

不问归期 提交于 2020-05-18 03:46:28
问题 I've installed Kivy and all the need files as far as I know, but I'm still getting this error message and I don't know why. from kivy.app import App from kivy.uix.gridlayout import GridLayout class Container(GridLayout): pass class MainApp(App): def build(self): self.title = 'Awesome app!!!' return Container() if __name__ == "__main__": app = MainApp() app.run() This is the error message I get: Traceback (most recent call last): File "C:\Users\Yassi\OneDrive\Afbeeldingen\Bureaublad\main.py",

ModuleNotFoundError: No module named 'yaml'

不想你离开。 提交于 2020-05-16 02:02:19
问题 I have used a YAML file and have imported PyYAML into my project. The code works fine in PyCharm, however on creation of an egg and running the egg gives an error as module not found on command prompt. 回答1: You have not provided quite enough information for an exact answer, but, for missing python modules, simply run py -m pip install PyYaml or, in some cases python pip install PyYaml You may have imported it in your project (on PyCharm) but you have to make sure it is installed and imported

Google-Colaboratory local module ModuleNotFoundError

偶尔善良 提交于 2020-04-18 07:00:30
问题 I have cloned a github repository into google-colab [https://github.com/limbo018/DREAMPlace] and installed the necessary requirements. When I run the main script (!python dreamplace/placer.py) from either the base repo directory or the cmake install directory in jupyter I receive a modulenotfound error. I am able to import the module from a jupyter cell. The placer.py script imports it's parent module (dreamplace), which I have added to the path. I have a feeling colab/jupyter spawns a

No module named '_bz2' in python3

北城余情 提交于 2020-04-12 17:09:27
问题 When trying to execute the following command: import matplotlib.pyplot as plt The following error occurs: from _bz2 import BZ2Compressor, BZ2Decompressor ImportError: No module named '_bz2' So, I was trying to install bzip2 module in Ubuntu using : sudo pip3 install bzip2 But, the following statement pops up in the terminal: Could not find a version that satisfies the requirement bzip2 (from versions: ) No matching distribution found for bzip2 What can I do to solve the problem? 回答1: If you

No module named '_bz2' in python3

狂风中的少年 提交于 2020-04-12 17:04:50
问题 When trying to execute the following command: import matplotlib.pyplot as plt The following error occurs: from _bz2 import BZ2Compressor, BZ2Decompressor ImportError: No module named '_bz2' So, I was trying to install bzip2 module in Ubuntu using : sudo pip3 install bzip2 But, the following statement pops up in the terminal: Could not find a version that satisfies the requirement bzip2 (from versions: ) No matching distribution found for bzip2 What can I do to solve the problem? 回答1: If you

ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work

随声附和 提交于 2020-03-18 10:50:50
问题 I have seen similar issue but it is not solved either, so I decided to ask. I am trying to visualize my model in keras using from keras.utils import plot_model plot_model(model, to_file='model.png') First, it showed error ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work. Accordingly, I installed pydot and graphviz through Anaconda prompt activating my environment using conda install -c https://conda.binstar.org/t/TOKEN/j14r pydot conda install

ImportError: cannot import name '_print_elapsed_time'

南楼画角 提交于 2020-03-02 04:27:03
问题 Hi so I'm trying to use the make_pipeline module in sklearn. But when I try to import it with: from sklearn.pipeline import make_pipeline I get this error: ImportError: cannot import name '_print_elapsed_time' I've googled it but there seems to be no other posts about this. I tried reinstalling scikitlearn but I still get the same error :/ Anyone have any ideas? 回答1: It looks like this was a bug introduced into one of the newer versions of scikit-learn (I got this same issue in version 0.21.2

ImportError: cannot import name 'SourceDistribution' from 'pip._internal.distributions.source'

為{幸葍}努か 提交于 2020-02-10 04:27:48
问题 pip3 install is not working and also pip3 is not being able to downgrade to pip19 from pip20.0: Rayaans-MacBook-Pro:~ rayaangrewal$ pip3 install Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/bin/pip3", line 10, in <module> sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/cli/main.py", line 73, in main command = create_command(cmd_name, isolated=("--isolated" in cmd_args)) File "

ImportError: cannot import name 'SourceDistribution' from 'pip._internal.distributions.source'

徘徊边缘 提交于 2020-02-10 04:26:08
问题 pip3 install is not working and also pip3 is not being able to downgrade to pip19 from pip20.0: Rayaans-MacBook-Pro:~ rayaangrewal$ pip3 install Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/bin/pip3", line 10, in <module> sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/cli/main.py", line 73, in main command = create_command(cmd_name, isolated=("--isolated" in cmd_args)) File "

Multiprocessing code works upon import, breaks upon being called

巧了我就是萌 提交于 2020-02-04 08:31:22
问题 In a file called test.py I have print 'i am cow' import multi4 print 'i am cowboy' and in multi4.py I have import multiprocessing as mp manager = mp.Manager() print manager I am confused by the way this code operates. At the command line, if I type python and then in the python environment if I type import test.py I get the expected behavior: Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information