I am trying to make an executable with python, py2exe using Enthought. And I'm sure there is no problem with my setup.py.
But after running:python setup.py py2exe. There is an error look as below:
ImportError: No module named distutils.core
So, how can I solve the problem?
Related
I am trying to install the following library on Databricks:
from azure.storage.filedatalake import DataLakeFileClient
However, I'm getting the following error:
ModuleNotFoundError: No module named 'azure'
Can someone let me know the actual module to install?
This should be azure-storage-file-datalake and pip based installation.
I recently got into development with Python running on WSL (Ubuntu 18.04 LTS).
I followed the documentation from here and I'm able to run simple python scripts.
I started playing around with libraries that I installed using the pip3 command such as numpy and pandas and these work fine.
The problem arises when I try to use the statsmodels package.
I've installed it using pip3 install statsmodels
I can see the package in /home/username/.local/lib/python3.6/site-packages/statsmodels I can even see the api.py file in that directory, however, when I type import statsmodels.api as sm as recommended on the statsmodels website I get:
Console output:
username#DESKTOP-1JP4BIE:/mnt/c/users/username/dev/project/playground$ python3 statsmodels.py
Traceback (most recent call last):
File "statsmodels.py", line 5, in <module>
import statsmodels.api as sm
File "/mnt/c/username/chris/dev/project/playground/statsmodels.py", line 5, in <module>
import statsmodels.api as sm
ModuleNotFoundError: No module named 'statsmodels.api'; 'statsmodels' is not a package
I've tried uninstalling and reinstalling (did not work)
I really can't see anything that differentiates this package from the others that I've installed. Does anyone have any insights?
Thanks #Vorsprung durch Technik
The issue was that my file name was statsmodels.py.
I'll remember to be more careful when naming my python files.
I have opened up a Jupyter Notebook and tried to import a module from pyomo but get the following:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-f9221793da50> in <module>
----> 1 from pyomo.environ import *
ModuleNotFoundError: No module named 'pyomo'
When I run this code in PyCharm however I get no problems with the module not being found. Can someone help me to understand why Jupyter is unable to find the module yet PyCharm is able to? If there is some information that I am missing that would be useful please let me know and I will update accordingly.
You have to install it. Put this line as the first line in jupyter notebook
!pip install pyomo
note that any missing module is installed like this.
I'm using python 3.6
Trying to make and exe from my .py file. but when I run python setup.py build
it give me an error
raise ImportError("No module named %r" % name)
ImportError: No module named 'idna'
My setup file is like this
setup file
Save:
# thanks to https://www.youtube.com/watch?v=GSoOwSqTSrs
from cx_Freeze import setup, Executable
setup(
name='KutsalAklinNerde?',
version='0.1', #Further information about its version
description='Parse stuff', #It's description
executables= [Executable("Example.py")])
as setup.py in the same directory of your Example.py (the .py you want to convert to .exe)
And then run >python setup.py build in that directory with command prompt.
Getting the No module named 'matplotlib.pyplot'; matplotlib is not a package error when trying to run:
import matplotlib.pyplot
plt.plot([1,2,3,4],[4,7,8,12])
plt.show()
Im running python 3.3, and have installed the correct matplotlib, and six library. i have checked this by running pip list.
I have also tried running the file in terminal, and when i do this the error changes from matplotlib is not a module to no module named pyplot.