importerror

ImportError: No module named bs4 on mac

半世苍凉 提交于 2021-02-19 05:09:52
问题 I sat down tonight and have decided to leran how to use python. Inspired by this webpage scraping article. cam.ly/danesblog/2011/01/craigslist-arbitrage/ after working through a tutorial I: 1) downloaded and installed python: http://www.python.org/getit/ first 3.3 then 2.7 2) downloaded bs4: www.crummy.com/software/BeautifulSoup/bs4/download/ 3) followed Brian Clapper's instructions: How can I install the Beautiful Soup module on the Mac? tried both easy_install and python setup.py install

ImportError: No module named bs4 on mac

左心房为你撑大大i 提交于 2021-02-19 05:09:20
问题 I sat down tonight and have decided to leran how to use python. Inspired by this webpage scraping article. cam.ly/danesblog/2011/01/craigslist-arbitrage/ after working through a tutorial I: 1) downloaded and installed python: http://www.python.org/getit/ first 3.3 then 2.7 2) downloaded bs4: www.crummy.com/software/BeautifulSoup/bs4/download/ 3) followed Brian Clapper's instructions: How can I install the Beautiful Soup module on the Mac? tried both easy_install and python setup.py install

Matplotlib in py2exe — ImportError: cannot import name dist (File “distutils\__init__.pyc”)

落爺英雄遲暮 提交于 2021-02-18 12:09:45
问题 Matplotlib working in this app perfectly.. but not working in build for some reason. Why? I'll gladly take any advice that can help me. .exe.log : Traceback (most recent call last): File "main.py", line 3, in <module> File "zipextimporter.pyc", line 82, in load_module File "matplotlib\__init__.pyc", line 103, in <module> File "zipextimporter.pyc", line 82, in load_module File "distutils\__init__.pyc", line 25, in <module> ImportError: cannot import name dist main.py is a script that I'm

Matplotlib in py2exe — ImportError: cannot import name dist (File “distutils\__init__.pyc”)

微笑、不失礼 提交于 2021-02-18 12:09:43
问题 Matplotlib working in this app perfectly.. but not working in build for some reason. Why? I'll gladly take any advice that can help me. .exe.log : Traceback (most recent call last): File "main.py", line 3, in <module> File "zipextimporter.pyc", line 82, in load_module File "matplotlib\__init__.pyc", line 103, in <module> File "zipextimporter.pyc", line 82, in load_module File "distutils\__init__.pyc", line 25, in <module> ImportError: cannot import name dist main.py is a script that I'm

How to properly handle a circular module dependency in Python?

与世无争的帅哥 提交于 2021-02-16 16:12:37
问题 Trying to find a good and proper pattern to handle a circular module dependency in Python. Usually, the solution is to remove it (through refactoring); however, in this particular case we would really like to have the functionality that requires the circular import. EDIT : According to answers below, the usual angle of attack for this kind of issue would be a refactor. However, for the sake of this question, assume that is not an option (for whatever reason). The problem: The logging module

How to properly handle a circular module dependency in Python?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-16 16:09:18
问题 Trying to find a good and proper pattern to handle a circular module dependency in Python. Usually, the solution is to remove it (through refactoring); however, in this particular case we would really like to have the functionality that requires the circular import. EDIT : According to answers below, the usual angle of attack for this kind of issue would be a refactor. However, for the sake of this question, assume that is not an option (for whatever reason). The problem: The logging module

module 'a' has no attribute func()

放肆的年华 提交于 2021-02-11 13:46:30
问题 I have 2 modules: a: import another_module def func(): b: import a x=a.func() This is showing error: module 'a' has no attribute 'func'. What i am doing wrong in importing a.ipynb 回答1: Make sure your module is names 'a.py', and it is in the same folder as b, otherwise, in the place where all the other modules are stored. 来源: https://stackoverflow.com/questions/61870325/module-a-has-no-attribute-func

ImportError: cannot import name 'context' from 'tensorflow.python.eager' (unknown location)

拈花ヽ惹草 提交于 2021-02-10 14:51:01
问题 I created virtual environment and installed both tensorflow and tensorflow-gpu. After that I installed keras. And then I checked in my conda terminal by importing keras and I was able to import keras in it. However, using jupyter notebook if I try to import keras then it gives me below error. import keras ImportError Traceback (most recent call last) <ipython-input-5-88d96843a926> in <module> ----> 1 import keras ~\Anaconda3\lib\site-packages\keras\__init__.py in <module> 1 from __future__

Import Error when Importing Geopandas

只愿长相守 提交于 2021-02-09 08:43:33
问题 When trying to import geopandas into my jupyter notebook I get an ImportError: DLL load failed . I have already run pip install geopandas from my terminal and get "Requirement already satisfied". I have also tried pip install --upgrade pip setuptools which hasnt worked either. Here is the full error report when trying to import geopandas: ImportError Traceback (most recent call last) <ipython-input-2-fc7d1d298f0c> in <module>() ----> 1 import geopandas ~\AppData\Local\Continuum\Anaconda3\lib

Trying to use win32ui with pywin32 gives: A dynamic link library (DLL) initialization routine failed

自作多情 提交于 2021-02-08 06:39:55
问题 I am trying to use the win32ui module from pywin32 (yes i have the correct version). My win32gui module does work fine but the ui module give me and error. I have already tried: reinstalling python, adding PYTHON_PATH too system vars, running the after install pywin32 script, For the rest I am kinda of out thing i can try to do. Python version: 3.9 (64 bit) Pywin32 version: pywin32-228.win-amd64-py3.9 (is the .exe file name i don't know how to find the version) just to clear up my only code