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

Can't install flask-mongoengine in my virtual environment #402

Closed
keerthivasan-g opened this issue Jun 14, 2020 · 18 comments
Closed

Can't install flask-mongoengine in my virtual environment #402

keerthivasan-g opened this issue Jun 14, 2020 · 18 comments

Comments

@keerthivasan-g
Copy link

pip install flask-mongoengine
Collecting flask-mongoengine
Using cached flask-mongoengine-0.9.5.tar.gz (111 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\keerthivasan\desktop\pybox\venv\scripts\python.exe' -c 'import
sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\keerthivasan\AppData\Local

\Temp\pip-install-su4c26f2\flask-mongoengine\setup.py'"'"'; file='"'"'C:\User
s\keerthivasan\AppData\Local\Temp\pip-install-su4c26f2\flask-mongoengine\setup.
py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"
'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg
_info --egg-base 'C:\Users\keerthivasan\AppData\Local\Temp\pip-pip-egg-info-xw613uem'
cwd: C:\Users\keerthivasan\AppData\Local\Temp\pip-install-su4c26f2\flask-mong
oengine\

im trying to install flask-mongoengine but can't for some reasons. Help me out

@vinu76jsr
Copy link

Can you install anything else or is it just a problem with flask-mongoengine

@keerthivasan-g
Copy link
Author

Can you install anything else or is it just a problem with flask-mongoengine

problem with flask-mongoengine only

@vinu76jsr
Copy link

if there is a permission issue or python conflict in windows, usually explicitly specififying pip module helps, python -m pip install flask-mongoengine

@christopherpross
Copy link

Hey, I can reproduce this issue.
I don't know, but maybe this is because I use python 3.8 here? Here is the output. The idea at the last comment doen't work, it produce the same output. here is it:

(venv) chpross@vmd21292:~/project-elrond$ python3 -m pip install flask-mongoengine
Collecting flask-mongoengine
Using cached flask-mongoengine-0.9.5.tar.gz (111 kB)
ERROR: Command errored out with exit status 1:
command: /home/chpross/project-elrond/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qgz3p0ke/flask-mongoengine/setup.py'"'"'; file='"'"'/tmp/pip-install-qgz3p0ke/flask-mongoengine/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-qgz3p0ke/flask-mongoengine/pip-egg-info
cwd: /tmp/pip-install-qgz3p0ke/flask-mongoengine/
Complete output (44 lines):
WARNING: The wheel package is not available.
ERROR: Command errored out with exit status 1:
command: /home/chpross/project-elrond/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-uuurfyzw/rednose/setup.py'"'"'; file='"'"'/tmp/pip-wheel-uuurfyzw/rednose/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 /tmp/pip-wheel-ydfi3ngu
cwd: /tmp/pip-wheel-uuurfyzw/rednose/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for rednose
ERROR: Failed to build one or more wheels
Traceback (most recent call last):
  File "/home/chpross/project-elrond/venv/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
    subprocess.check_call(cmd)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/chpross/project-elrond/venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp3z90mx39', '--quiet', 'rednose']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-qgz3p0ke/flask-mongoengine/setup.py", line 36, in <module>
    setup(
  File "/home/chpross/project-elrond/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "/home/chpross/project-elrond/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/home/chpross/project-elrond/venv/lib/python3.8/site-packages/setuptools/dist.py", line 718, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/home/chpross/project-elrond/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 780, in resolve
    dist = best[req.key] = env.best_match(
  File "/home/chpross/project-elrond/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/home/chpross/project-elrond/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/home/chpross/project-elrond/venv/lib/python3.8/site-packages/setuptools/dist.py", line 777, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/home/chpross/project-elrond/venv/lib/python3.8/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
    raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['/home/chpross/project-elrond/venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp3z90mx39', '--quiet', 'rednose']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
(venv) chpross@vmd21292:~/project-elrond$

@vinu76jsr
Copy link

@christopherpross can you share your environment(OS version) python version etc, I will try to reproduce it on my system if it is linux/mac.

@christopherpross
Copy link

@vinu76jsr hey, of curse:

  • python 64 bit, version: 3.8.2 (GCC 9.3.0)
  • ubuntu: Ubuntu 20.04 LTS (64 bit)
  • shell: bash

hope it helps.

@insspb
Copy link
Collaborator

insspb commented Jun 25, 2020

@keerthivasan-g @christopherpross
Please try master version.

@wangyu190810
Copy link

@christopherpross master version install success.

@arthuravila26
Copy link

same here! Already using master version.

@luca-drf
Copy link

I had the same problem with Python 3.7.8 installing from PyPI. Installing from master works fine but I was wondering if there's a plan to publish new releases as the latest release on GitHub is 0.9.2 (Feb 2017), PyPI is 0.9.5 (Feb 2018) and the current setup.py is 0.10.7.

Thanks!

@lucassimon
Copy link

Same problem here

$ python3 
Python 3.8.2 (default, Jul 16 2020, 14:00:26) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

ubuntu: Ubuntu 20.04 LTS (64 bit)
shell: zsh
$ pip install -r requirements/dev.txt
Requirement already satisfied: Flask in ./.venv/lib/python3.8/site-packages (from -r requirements/base.txt (line 1)) (1.1.2)
Collecting Flask-RESTful
  Using cached Flask_RESTful-0.3.8-py2.py3-none-any.whl (25 kB)
Collecting python-dotenv
  Using cached python_dotenv-0.14.0-py2.py3-none-any.whl (17 kB)
Requirement already satisfied: pymongo in ./.venv/lib/python3.8/site-packages (from -r requirements/base.txt (line 4)) (3.11.0)
Collecting flask-mongoengine
  Using cached flask-mongoengine-0.9.5.tar.gz (111 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k1g0t687/flask-mongoengine/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k1g0t687/flask-mongoengine/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-k1g0t687/flask-mongoengine/pip-egg-info
         cwd: /tmp/pip-install-k1g0t687/flask-mongoengine/
    Complete output (44 lines):
    WARNING: The wheel package is not available.
      ERROR: Command errored out with exit status 1:
       command: /home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-z8t7tfli/rednose/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-z8t7tfli/rednose/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 /tmp/pip-wheel-alm6064h
           cwd: /tmp/pip-wheel-z8t7tfli/rednose/
      Complete output (6 lines):
      usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: setup.py --help [cmd1 cmd2 ...]
         or: setup.py --help-commands
         or: setup.py cmd --help
    
      error: invalid command 'bdist_wheel'
      ----------------------------------------
      ERROR: Failed building wheel for rednose
    ERROR: Failed to build one or more wheels
    Traceback (most recent call last):
      File "/home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpyp1dkgh9', '--quiet', 'rednose']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-k1g0t687/flask-mongoengine/setup.py", line 36, in <module>
        setup(
      File "/home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/lib/python3.8/site-packages/setuptools/__init__.py", line 164, in setup
        _install_setup_requires(attrs)
      File "/home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/lib/python3.8/site-packages/setuptools/__init__.py", line 159, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/lib/python3.8/site-packages/setuptools/dist.py", line 699, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "/home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 779, in resolve
        dist = best[req.key] = env.best_match(
      File "/home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1064, in best_match
        return self.obtain(req, installer)
      File "/home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1076, in obtain
        return installer(requirement)
      File "/home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/lib/python3.8/site-packages/setuptools/dist.py", line 758, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/lib/python3.8/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['/home/lucas/workspaces/plataformafii/apis/api-plataforma-fii/.venv/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpyp1dkgh9', '--quiet', 'rednose']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@cicciodifranco
Copy link

Hey.
I had the same problem but i found this on stackoverflow.

pip install wheel and then pip install flask-mongoengine worked for me.

@RammusXu
Copy link

I guess it relate to pypa/setuptools#1934 (comment)

Caused by

tests_require=test_requirements,

@shenmou98
Copy link

Hey.
I had the same problem but i found this on stackoverflow.

pip install wheel and then pip install flask-mongoengine worked for me.

Thanks, this work for me. ( pip install wheel and then pip install flask-mongoengine )

@kynan
Copy link

kynan commented Oct 23, 2020

The problem is that that there is no Python 3 wheel for flask-mongoengine 0.9.5, see #410.

@insspb
Copy link
Collaborator

insspb commented Nov 21, 2020

Hi, dear all.

Thank you for patience. Unfortunately (or maybe hopefully?) i am currently has no flask or mongo related projects, so my time here is very limited. After some fight with travis, I was able to deploy new version to pip. Please check.

@insspb insspb closed this as completed Nov 21, 2020
@qre0ct
Copy link

qre0ct commented Dec 26, 2020

This still does not seem to be working. I keep getting the same error:

vagrant@ubuntu-xenial:~$ sudo pip install flask-mongoengine
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
WARNING: The directory '/home/vagrant/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting flask-mongoengine
  Downloading flask-mongoengine-1.0.0.tar.gz (117 kB)
     |################################| 117 kB 2.0 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python /usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpsDsEsP
       cwd: /tmp/pip-install-qSP05Q/flask-mongoengine
  Complete output (18 lines):
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/usr/local/lib/python2.7/dist-packages/setuptools/build_meta.py", line 146, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/usr/local/lib/python2.7/dist-packages/setuptools/build_meta.py", line 127, in _get_build_requires
      self.run_setup()
    File "/usr/local/lib/python2.7/dist-packages/setuptools/build_meta.py", line 243, in run_setup
      self).run_setup(setup_script=setup_script)
    File "/usr/local/lib/python2.7/dist-packages/setuptools/build_meta.py", line 142, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 12, in <module>
      long_description = open(doc_path, encoding="utf-8").read()
  TypeError: 'encoding' is an invalid keyword argument for this function
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python /usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpsDsEsP Check the logs for full command output.

I have also tried pip install wheel and then pip install flask-mongoengine but it does not seem to solve the problem. Can someone please help me understand :

  1. What's the problem here? Am I missing something?
  2. What can I do to solve the issue?

@insspb
Copy link
Collaborator

insspb commented Dec 26, 2020

@qre0ct The answer to your question is in second line of copy/paste.
We do not support python 2.7 any more.

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