importerror

Default pip installation of Dask gives “ImportError: No module named toolz”

 ̄綄美尐妖づ 提交于 2020-01-02 00:51:26
问题 I installed Dask using pip like this: pip install dask and when I try to do import dask.dataframe as dd I get the following error message: >>> import dask.dataframe as dd Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/path/to/venv/lib/python2.7/site-packages/dask/__init__.py", line 5, in <module> from .async import get_sync as get File "/path/to/venv/lib/python2.7/site-packages/dask/async.py", line 120, in <module> from toolz import identity ImportError: No

Import multiple components in vue using ES6 syntax doesn't work [duplicate]

亡梦爱人 提交于 2020-01-01 08:42:58
问题 This question already has answers here : Is it possible to import modules from all files in a directory, using a wildcard? (11 answers) Closed 2 years ago . So I am trying to create a vue instance that needs other components from folder "views/" Here is the file structure: Project build/ config/ node_modules/ src/ views/ components/ App.vue If I do this in App.vue, the server will run with no error: import Navbar from 'layouts/Navbar' import Topbar from 'layouts/Topbar' import AppMain from

import static without package name

只谈情不闲聊 提交于 2020-01-01 08:35:07
问题 Consider the following simple example of code: public class TestStaticImport { static enum Branches { APPLE, IBM } public static void doSomething(Branches branch) { if (branch == APPLE) { System.out.println("Apple"); } } } If we will try to compile this code, we will get the error message: java: cannot find symbol symbol: variable APPLE location: class TestStaticImport This could be solved by introducing static import of this enum : import static ... TestStaticImport.Branches.* But in this

Python — read_pickle ImportError: No module named indexes.base

白昼怎懂夜的黑 提交于 2020-01-01 07:29:08
问题 I write a numeric dataframe to .pkl file in a machine (df.to_pickle()), for some reason, I have to open this file in a different machine (pd.read_pickle()), I get an Import Error saying: No module named indexes.base, and when I try to import indexes, there doesn't seem to have one. When I tried to_csv in a machine and read_csv in a different one, it worked. Many Thanks! ImportError Traceback (most recent call last) <ipython-input-199-2be4778e3b0a> in <module>() ----> 1 pd.read_pickle("test

Python — read_pickle ImportError: No module named indexes.base

时光毁灭记忆、已成空白 提交于 2020-01-01 07:29:07
问题 I write a numeric dataframe to .pkl file in a machine (df.to_pickle()), for some reason, I have to open this file in a different machine (pd.read_pickle()), I get an Import Error saying: No module named indexes.base, and when I try to import indexes, there doesn't seem to have one. When I tried to_csv in a machine and read_csv in a different one, it worked. Many Thanks! ImportError Traceback (most recent call last) <ipython-input-199-2be4778e3b0a> in <module>() ----> 1 pd.read_pickle("test

Relative import problems in Python 3

柔情痞子 提交于 2020-01-01 04:23:06
问题 Python imports drive me crazy (my experience with python imports sometime doesn't correspond at all to idiom 'Explicit is better than implicit' :( ): [app] start.py from package1 import module1 [package1] __init__.py print('Init package1') module1.py print('Init package1.module1') from . import module2 module2.py print('Init package1.module2') import sys, pprint pprint.pprint(sys.modules) from . import module1 I get: vic@ubuntu:~/Desktop/app2$ python3 start.py Init package1 Init package1

Python package import from parent directory

只愿长相守 提交于 2020-01-01 01:15:17
问题 I've the following source code structure /testapp/ /testapp/__init__.py /testapp/testmsg.py /testapp/sub/ /testapp/sub/__init__.py /testapp/sub/testprinter.py where testmsg defines the following constant: MSG = "Test message" and sub/testprinter.py : import testmsg print("The message is: {0}".format(testmsg.MSG)) But I'm getting ImportError: No module named testmsg Shouldn't it be working since the package structure? I don't really want to extend sys.path in each submodule and I don't even

ImportError: No module named py31compat

最后都变了- 提交于 2019-12-31 04:42:49
问题 i am trying to install gensim using sudo -H pip install --upgrade gensim but it is giving me this error : File "setup.py", line 301, in <module> include_package_data=True, File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/dist-packages/setuptools/command

Heroku: ImportError: No module named site

非 Y 不嫁゛ 提交于 2019-12-31 00:46:20
问题 After some changes in my repo and deploy to heroku I am receiving the following error: ImportError: No module named site I not have idea what can cause the problem because I only change some Django templates in the last 2 commits. Best Regards 回答1: Take a look at your Procfile. It should show something like this: web: gunicorn site:app Make sure site is the name of your app. 回答2: I just had a very similar issue which I was able to solve. Maybe it is the same problem? Heroku app crashed after

Import statement works on PyCharm but not from terminal

一个人想着一个人 提交于 2019-12-28 14:01:11
问题 Pycharm 2016.2.3, Mac OS X 10.11.1, Python 3.5 (Homebrew); I have this folder structure project /somepackage /subpackage __init__.py bar.py __init__.py foo.py foo.py: import somepackage.subpackage.bar print("foo") bar.py: print("bar") So my expected output is bar foo This works fine when run from PyCharm. However, when I run it from my terminal I get an ImportError: $ pwd $ /home/project (not the actual path; just omitting some personal stuff) $ python3.5 somepackage/foo.py File "foo.py",