python-module

pyserial for Python 2.7.2

随声附和 提交于 2019-12-02 21:12:20
I'm new to Python. According to the internets I was looking for the module pyserial after receiving this error: ImportError: No module named serial I first tried to install pywin32 , it went well. But it seems not to contain pyserial. :-( Then I found a single module installer for pyserial, I was not able to install it, it says it did not found the path to python in the registry. :-( After that I found this module on python.org, but I don't know what to do, it does not come with an installer. :-( How can I add pyserial to Python (64) 2.7 on Windows 7 64 ? Constantinius You could try it with

Easiest way to automatically download required modules in Python?

你离开我真会死。 提交于 2019-12-02 20:21:28
I would like to release a python module I wrote which depends on several packages. What's the easiest way to make it so these packages are programmatically downloaded just in case they are not available on the system that's being run? Most of these modules should be available by easy_install or pip or something like that. I simply want to avoid having the user install each module separately. thanks. gotgenes pip uses requirements files , which have a very straightforward format . For more Python packaging tooling recommendations, see the latest from the Python Packaging Authority (PyPA) . See

Difference between Module and Class in Python

被刻印的时光 ゝ 提交于 2019-12-02 17:34:54
Can I assign value to a variable in the module. If yes, what is the difference between a class and module. PS: I'm a java guy. In case if its helps in way of explaining. Thanks. Leonardo Chirivì Module : A module is a file containing Python definitions and statements. As the doc say. So a module in python is simply a way to organize the code, and it contains either python classes or just functions. If you need those classes or functions in your project, you just import them. For instance, the math module in python contains just a bunch of functions, and you just call those needed ( math.sin ).

How to install python modules without pip?

核能气质少年 提交于 2019-12-02 09:07:34
I have tried installing python modules with pip and I get the following: proof that pip is installed PS C:\Users\usename\AppData\Local\Programs\Python\Python37-32> pip Usage: pip <command> [options] Commands: install Install packages. download Download packages. uninstall Uninstall packages. freeze Output installed packages in requirements format. list List installed packages. show Show information about installed packages. check Verify installed packages have compatible dependencies. config Manage local and global configuration. search Search PyPI for packages. wheel Build wheels from your

How to install python modules without pip?

人走茶凉 提交于 2019-12-02 06:48:41
问题 I have tried installing python modules with pip and I get the following: proof that pip is installed PS C:\Users\usename\AppData\Local\Programs\Python\Python37-32> pip Usage: pip <command> [options] Commands: install Install packages. download Download packages. uninstall Uninstall packages. freeze Output installed packages in requirements format. list List installed packages. show Show information about installed packages. check Verify installed packages have compatible dependencies. config

ModuleNotFoundError: No module named 'pandas' when importing module

[亡魂溺海] 提交于 2019-12-02 06:42:25
问题 When running my module directly with as a flask app through Docker with Python 3, which installs pandas based on the requirements.txt file, it runs fine. When I import this module from another app, it doesn't find pandas. The following is my setup.py file. from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() setup( name='g_plotter', packages=find_packages(), #packages=['g_plotter', 'pandas'], include_package_data=True, """ install

ModuleNotFoundError: No module named 'pandas' when importing module

孤人 提交于 2019-12-02 04:34:11
When running my module directly with as a flask app through Docker with Python 3, which installs pandas based on the requirements.txt file, it runs fine. When I import this module from another app, it doesn't find pandas. The following is my setup.py file. from setuptools import setup, find_packages with open('requirements.txt') as f: required = f.read().splitlines() setup( name='g_plotter', packages=find_packages(), #packages=['g_plotter', 'pandas'], include_package_data=True, """ install_requires=[ 'flask', ], """ install_requires=required, ) Failure at: import pandas as pd Traceback server

Django says - No module named 'blog'

陌路散爱 提交于 2019-12-01 22:18:35
问题 I am getting "ModuleNotFoundError: No module named 'blog'" error when add my blog app to the INSTALLED_APPS section of settings.py . I have determined that it has something to do with the way I have added the "blog" app under INSTALLED_APPS. When I remove the 'blog' reference from INSTALLED_APPS error goes away. It looks like that Django is unable to find directory for my blog app? I have done one thing differently and that is use: python manage.py startapp blog /myproject Difference here is

Django says - No module named 'blog'

守給你的承諾、 提交于 2019-12-01 18:23:34
I am getting "ModuleNotFoundError: No module named 'blog'" error when add my blog app to the INSTALLED_APPS section of settings.py . I have determined that it has something to do with the way I have added the "blog" app under INSTALLED_APPS. When I remove the 'blog' reference from INSTALLED_APPS error goes away. It looks like that Django is unable to find directory for my blog app? I have done one thing differently and that is use: python manage.py startapp blog /myproject Difference here is specifying the /myproject directory and not using: python manage.py startapp blog Which will place it

Python Modules: When one imports them, do they go into memory?

最后都变了- 提交于 2019-12-01 17:09:54
I just finished this exercise for beginners on creating and importing modules in python. I was wondering does everything in the module get imported into the computer's memory? Will there be implications later on with memory as the code gets longer and the modules imported become more numerous? Will I need to know memory management to write resource-efficient code because of this? Your modules are automatically compiled (.pyc files) which are then imported into memory, but you do not have to be affraid of getting out of memory: modules are very small; it is common to have thousands of modules