setuptools

ModuleNotFoundError: No module named <modulename> after pip install

帅比萌擦擦* 提交于 2020-08-27 21:44:12
问题 I do my first steps in python package distributions. Unfortunately, I have ModuleNotFoundError after successful install from pip. My dirs layout is pretty simple: maindir |- setup.py |- pysoft |- __init__.py |- main.py |- pylib.py main.py: import pylib def main(): print("main program") pylib.libfunc() if __name__ == '__main__': main() pylib.py: def libfunc(): print("lib func") setup.py: import setuptools setuptools.setup( name='pysoft', version='0.0.21', author='als', author_email='als@gnail

ModuleNotFoundError: No module named <modulename> after pip install

[亡魂溺海] 提交于 2020-08-27 21:43:07
问题 I do my first steps in python package distributions. Unfortunately, I have ModuleNotFoundError after successful install from pip. My dirs layout is pretty simple: maindir |- setup.py |- pysoft |- __init__.py |- main.py |- pylib.py main.py: import pylib def main(): print("main program") pylib.libfunc() if __name__ == '__main__': main() pylib.py: def libfunc(): print("lib func") setup.py: import setuptools setuptools.setup( name='pysoft', version='0.0.21', author='als', author_email='als@gnail

Environment inconsistent error when updating conda

落爺英雄遲暮 提交于 2020-08-05 10:08:31
问题 I am trying to install a package on Anaconda and I am keep getting environment inconsistent error. I have tried all the solutions in this post (I am listing them here) but the error remain the same: 1) update conda failed: conda update --all 2) install anaconda failed: conda install anaconda 3) this one failed: conda activate base conda install anaconda conda update --all 4) this one failed too: conda install -c anaconda anaconda I also tried updating the individual packages that cause

Force compiler when running python setup.py install

对着背影说爱祢 提交于 2020-07-31 09:48:29
问题 Is there a way to explicitly force the compiler for building Cython extensions when running python setup.py install ? Where setup.py is of the form: import os.path import numpy as np from setuptools import setup, find_packages, Extension from Cython.Distutils import build_ext setup(name='test', packages=find_packages(), cmdclass={'build_ext': build_ext}, ext_modules = [ Extension("test.func", ["test/func.pyx"]) ], include_dirs=[np.get_include()] ) I'm trying to install a package on Windows 8

How do I add a Python tag to the bdist_wheel command using setuptools?

泪湿孤枕 提交于 2020-07-20 10:52:35
问题 Let's say I have a simple library which uses setuptools for packaging and distributing. The library in this case also requires a minimum version of Python 3.6, meaning my setup.py would be something like as follows: from setuptools import setup, find_packages setup( name='something', version='0.0.1', description='description', long_description=long_description, # More metadata packages=find_packages(exclude=['tests', 'docs']), python_requires='>=3.6' ) Now, when I run python setup.py bdist

MANIFEST.in, package_data, and data_files clarification?

我与影子孤独终老i 提交于 2020-07-17 07:16:02
问题 I am trying to create a Python package, and I have a directory structure like this: mypkg/ ├── __init__.py ├── module1 │ ├── x.py │ ├── y.py │ └── z.txt └── module2 ├── a.py └── b.py Then I added all the files in MANIFEST.in and when I check the created archive, it had all the files. When I do python setup.py install in the dist-packages/mypkg/module1 . I see only the Python files and not z.txt . I have z.txt in both MANIFEST.in and setup.py : setup ( packages = [ 'mypkg', 'mypkg.module1',

Can I update Amazon's old versions of pip and setuptools?

你离开我真会死。 提交于 2020-07-17 05:39:32
问题 Can I update or remove the pip and setuptools provided with AWS Elastic Beanstalk? The versions of pip and setuptools provided with my AWS Elastic Beanstalk Python environments (in the 2.7 virtual environment running my application, ami-d14608e1 ; in /opt/python/run/venv/lib/python2.7/site-packages ) are very old: as reported by pip list --outdated they are setuptools (Current: 2.2 Latest: 12.0.5) pip (Current: 1.5.4 Latest: 6.0.7) Can I update these (e.g. by listing them in my requirements

Can I update Amazon's old versions of pip and setuptools?

不羁的心 提交于 2020-07-17 05:39:15
问题 Can I update or remove the pip and setuptools provided with AWS Elastic Beanstalk? The versions of pip and setuptools provided with my AWS Elastic Beanstalk Python environments (in the 2.7 virtual environment running my application, ami-d14608e1 ; in /opt/python/run/venv/lib/python2.7/site-packages ) are very old: as reported by pip list --outdated they are setuptools (Current: 2.2 Latest: 12.0.5) pip (Current: 1.5.4 Latest: 6.0.7) Can I update these (e.g. by listing them in my requirements