Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install flexer in new virtualenv - Missing module "six" #19

Closed
HelloKashif opened this issue Jun 1, 2017 · 1 comment
Closed

Comments

@HelloKashif
Copy link
Contributor

HelloKashif commented Jun 1, 2017

There has been some changes in setuptools causing this issue.

Steps

  1. Create a new virtualenv: $ virtualenv --no-site-packages .env
  2. Source env: source .env/bin/activate
  3. Try pip installing flexer: pip install flexer

Result: ImportError: No module named six

Trace:
Collecting flexer
Downloading flexer-1.2.2.tar.gz
Collecting click (from flexer)
Using cached click-6.7-py2.py3-none-any.whl
Collecting jinja2>=2.9.4 (from flexer)
Using cached Jinja2-2.9.6-py2.py3-none-any.whl
Collecting jsonschema==2.4.0 (from flexer)
Downloading jsonschema-2.4.0-py2.py3-none-any.whl
Collecting requests (from flexer)
Downloading requests-2.17.3-py2.py3-none-any.whl (87kB)
100% |████████████████████████████████| 92kB 4.8MB/s
Collecting pyyaml (from flexer)
Collecting MarkupSafe>=0.23 (from jinja2>=2.9.4->flexer)
Collecting certifi>=2017.4.17 (from requests->flexer)
Using cached certifi-2017.4.17-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->flexer)
Downloading chardet-3.0.3-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 3.6MB/s
Collecting urllib3<1.22,>=1.21.1 (from requests->flexer)
Using cached urllib3-1.21.1-py2.py3-none-any.whl
Collecting idna<2.6,>=2.5 (from requests->flexer)
Using cached idna-2.5-py2.py3-none-any.whl
Building wheels for collected packages: flexer
Running setup.py bdist_wheel for flexer ... error
Complete output from command /Users/kashif/Projects/CMP/ServiceCatalog/.env/bin/python2.7 -u -c "import setuptools, tokenize;file='/private/var/folders/n4/23kvlbpn77v8mg1fg3k72f580000gn/T/pip-build-HovhxP/flexer/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /var/folders/n4/23kvlbpn77v8mg1fg3k72f580000gn/T/tmpZsV68vpip-wheel- --python-tag cp27:
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:251: UserWarning: 'licence' distribution option is deprecated; use 'license'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/flexer
copying flexer/init.py -> build/lib/flexer
copying flexer/cli.py -> build/lib/flexer
copying flexer/commands.py -> build/lib/flexer
copying flexer/config.py -> build/lib/flexer
copying flexer/context.py -> build/lib/flexer
copying flexer/module_template.py -> build/lib/flexer
copying flexer/runner.py -> build/lib/flexer
copying flexer/utils.py -> build/lib/flexer
creating build/lib/flexer/clients
copying flexer/clients/init.py -> build/lib/flexer/clients
copying flexer/clients/cmp.py -> build/lib/flexer/clients
copying flexer/clients/nflex.py -> build/lib/flexer/clients
creating build/lib/flexer/connector_tests
copying flexer/connector_tests/init.py -> build/lib/flexer/connector_tests
copying flexer/connector_tests/test_base.py -> build/lib/flexer/connector_tests
creating build/lib/flexer/validation
copying flexer/validation/init.py -> build/lib/flexer/validation
running egg_info
writing requirements to flexer.egg-info/requires.txt
writing flexer.egg-info/PKG-INFO
writing top-level names to flexer.egg-info/top_level.txt
writing dependency_links to flexer.egg-info/dependency_links.txt
writing entry points to flexer.egg-info/entry_points.txt
reading manifest file 'flexer.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'flexer.egg-info/SOURCES.txt'
creating build/lib/flexer/templates
creating build/lib/flexer/templates/metric_connector
copying flexer/templates/metric_connector/main.py.j2 -> build/lib/flexer/templates/metric_connector
copying flexer/templates/metric_connector/test-data.json.j2 -> build/lib/flexer/templates/metric_connector
creating build/lib/flexer/templates/resource_connector
copying flexer/templates/resource_connector/main.py.j2 -> build/lib/flexer/templates/resource_connector
creating build/lib/flexer/templates/test
copying flexer/templates/test/main.py.j2 -> build/lib/flexer/templates/test
copying flexer/validation/get_logs.json -> build/lib/flexer/validation
copying flexer/validation/get_metrics.json -> build/lib/flexer/validation
copying flexer/validation/get_resources.json -> build/lib/flexer/validation
copying flexer/validation/monitors.json -> build/lib/flexer/validation
installing to build/bdist.macosx-10.12-x86_64/wheel
running install
running install_lib
creating build/bdist.macosx-10.12-x86_64
creating build/bdist.macosx-10.12-x86_64/wheel
creating build/bdist.macosx-10.12-x86_64/wheel/flexer
copying build/lib/flexer/init.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer
copying build/lib/flexer/cli.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer
creating build/bdist.macosx-10.12-x86_64/wheel/flexer/clients
copying build/lib/flexer/clients/init.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer/clients
copying build/lib/flexer/clients/cmp.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer/clients
copying build/lib/flexer/clients/nflex.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer/clients
copying build/lib/flexer/commands.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer
copying build/lib/flexer/config.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer
creating build/bdist.macosx-10.12-x86_64/wheel/flexer/connector_tests
copying build/lib/flexer/connector_tests/init.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer/connector_tests
copying build/lib/flexer/connector_tests/test_base.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer/connector_tests
copying build/lib/flexer/context.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer
copying build/lib/flexer/module_template.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer
copying build/lib/flexer/runner.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer
creating build/bdist.macosx-10.12-x86_64/wheel/flexer/templates
creating build/bdist.macosx-10.12-x86_64/wheel/flexer/templates/metric_connector
copying build/lib/flexer/templates/metric_connector/main.py.j2 -> build/bdist.macosx-10.12-x86_64/wheel/flexer/templates/metric_connector
copying build/lib/flexer/templates/metric_connector/test-data.json.j2 -> build/bdist.macosx-10.12-x86_64/wheel/flexer/templates/metric_connector
creating build/bdist.macosx-10.12-x86_64/wheel/flexer/templates/resource_connector
copying build/lib/flexer/templates/resource_connector/main.py.j2 -> build/bdist.macosx-10.12-x86_64/wheel/flexer/templates/resource_connector
creating build/bdist.macosx-10.12-x86_64/wheel/flexer/templates/test
copying build/lib/flexer/templates/test/main.py.j2 -> build/bdist.macosx-10.12-x86_64/wheel/flexer/templates/test
copying build/lib/flexer/utils.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer
creating build/bdist.macosx-10.12-x86_64/wheel/flexer/validation
copying build/lib/flexer/validation/init.py -> build/bdist.macosx-10.12-x86_64/wheel/flexer/validation
copying build/lib/flexer/validation/get_logs.json -> build/bdist.macosx-10.12-x86_64/wheel/flexer/validation
copying build/lib/flexer/validation/get_metrics.json -> build/bdist.macosx-10.12-x86_64/wheel/flexer/validation
copying build/lib/flexer/validation/get_resources.json -> build/bdist.macosx-10.12-x86_64/wheel/flexer/validation
copying build/lib/flexer/validation/monitors.json -> build/bdist.macosx-10.12-x86_64/wheel/flexer/validation
running install_egg_info
Copying flexer.egg-info to build/bdist.macosx-10.12-x86_64/wheel/flexer-1.2.2-py2.7.egg-info
running install_scripts
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/n4/23kvlbpn77v8mg1fg3k72f580000gn/T/pip-build-HovhxP/flexer/setup.py", line 40, in
'Topic :: Software Development',
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/kashif/Projects/CMP/ServiceCatalog/.env/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 235, in run
self.run_command('install')
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/kashif/Projects/CMP/ServiceCatalog/.env/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 575, in run
self.run_command(cmd_name)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/kashif/Projects/CMP/ServiceCatalog/.env/lib/python2.7/site-packages/setuptools/command/install_scripts.py", line 17, in run
import setuptools.command.easy_install as ei
File "/Users/kashif/Projects/CMP/ServiceCatalog/.env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 49, in
from setuptools.py27compat import rmtree_safe
File "/Users/kashif/Projects/CMP/ServiceCatalog/.env/lib/python2.7/site-packages/setuptools/py27compat.py", line 7, in
import six
ImportError: No module named six


Need to add six in requirements.txt

@geodimm
Copy link
Contributor

geodimm commented Jun 1, 2017

Hi guys,
That's actually a change in the python setuptools package and has nothing to do with flexer. In fact, if you try installing any package on a virtual environment you'd get the same error (see pypa/setuptools#964 or pypa/setuptools#942 for reference).
As mentioned in one of the issues above, a workaround is:

pip install setuptools==33.1.1
pip install flexer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants