Giter Site home page Giter Site logo

Comments (12)

evandrone avatar evandrone commented on May 31, 2024 5

As a sidenote, got the same result with pip install drfdocs==0.0.10, but successfully installed 0.0.09 with pip install drfdocs==0.0.09

from django-rest-framework-docs.

veryhappythings avatar veryhappythings commented on May 31, 2024 5

The reason this is happening for some people and not others, as far as I can tell, is that a fair number of people have $PYTHONPATH=. set somewhere in their environments. I had this, and it didn't work - when I removed it, it worked. If you don't have it, the site directory doesn't get used instead of the built in library. I think there's something on my system that sets this for me, because it was being set even when I removed it from my zshrc - perhaps a part of virtualenvwrapper?

As a quick fix, this should work:

unset PYTHONPATH
pip install drfdocs

from django-rest-framework-docs.

rohanza avatar rohanza commented on May 31, 2024 1

I also experienced this on Python 3.5 on Ubuntu 16.04.
Seems like the error is caused by a site package inside the latest dist on pypi. This clashes with a stdlib module (https://docs.python.org/3/library/site.html) and breaks the import path.

from django-rest-framework-docs.

manosim avatar manosim commented on May 31, 2024

That's weird - I've just tried on a fresh virtual environment (both 3.5 & 2.7) and it works fine for me.

Update: Just tried on a fresh Ubuntu install (Python 2.7) and it worked there too.

screen shot 2016-07-25 at 17 53 34

screen shot 2016-07-25 at 17 52 31

screen shot 2016-07-25 at 18 37 30

from django-rest-framework-docs.

rohanza avatar rohanza commented on May 31, 2024

Here is my output on a clean virtualenv:

rohan@uberbook:$ mkvirtualenv drfdocs
Using base prefix '/home/rohan/.pyenv/versions/3.5.1'
New python executable in /home/rohan/venv/drfdocs/bin/python3.5
Also creating executable in /home/rohan/venv/drfdocs/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /home/rohan/venv/drfdocs/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/rohan/venv/drfdocs/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/rohan/venv/drfdocs/bin/preactivate
virtualenvwrapper.user_scripts creating /home/rohan/venv/drfdocs/bin/postactivate
virtualenvwrapper.user_scripts creating /home/rohan/venv/drfdocs/bin/get_env_details
(drfdocs) rohan@uberbook:
$ pip freeze
(drfdocs) rohan@uberbook:$ pip list
pip (8.1.2)
setuptools (25.1.0)
wheel (0.29.0)
(drfdocs) rohan@uberbook:
$ pip install drfdocs
Collecting drfdocs
Using cached drfdocs-0.0.11.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named 'setuptools'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-moeu5f0y/drfdocs/

UPDATE:
It installs fine when I remove the site package/directory mentioned above after I manually extracted the dist (tar.gz file) and run python setup.py install . It also works fine if I clone from github and build my own dist.

from django-rest-framework-docs.

hanfeisun avatar hanfeisun commented on May 31, 2024

same error for me

from django-rest-framework-docs.

LexFrench avatar LexFrench commented on May 31, 2024

Same issue here.

from django-rest-framework-docs.

caioariede avatar caioariede commented on May 31, 2024

Same issue here. drfdocs==0.0.9 works, no luck with 0.0.10 or 0.0.11.

Already reinstalled everything and still have the issue.

☁  ph [master] ⚡  pip uninstall drfdocs -y > /dev/null; pip install drfdocs==0.0.9 --no-cache-dir
Collecting drfdocs==0.0.9
  Downloading drfdocs-0.0.9.tar.gz (770kB)
    100% |████████████████████████████████| 778kB 5.0MB/s
Installing collected packages: drfdocs
  Running setup.py install for drfdocs ... done
Successfully installed drfdocs-0.0.9

☁  ph [master] ⚡  pip uninstall drfdocs -y > /dev/null; pip install drfdocs==0.0.10 --no-cache-dir
Collecting drfdocs==0.0.10
  Downloading drfdocs-0.0.10.tar.gz (770kB)
    100% |████████████████████████████████| 778kB 5.0MB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named setuptools

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/l8/gl87lhfn54b62j4j31x62j0r0000gn/T/pip-build-asTlbg/drfdocs/

☁  ph [master] ⚡  pip uninstall drfdocs -y > /dev/null; pip install drfdocs==0.0.11 --no-cache-dir
Cannot uninstall requirement drfdocs, not installed
Collecting drfdocs==0.0.11
  Downloading drfdocs-0.0.11.tar.gz (771kB)
    100% |████████████████████████████████| 778kB 6.7MB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named setuptools

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/l8/gl87lhfn54b62j4j31x62j0r0000gn/T/pip-build-SF7wDg/drfdocs/
☁  ph [master] ⚡

More info:

  Running setup.py (path:/private/var/folders/l8/gl87lhfn54b62j4j31x62j0r0000gn/T/pip-build-WMU0qV/drfdocs/setup.py) egg_info for package drfdocs
    Running command python setup.py egg_info
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named setuptools
Cleaning up...
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/l8/gl87lhfn54b62j4j31x62j0r0000gn/T/pip-build-WMU0qV/drfdocs/
Exception information:
Traceback (most recent call last):
  File "/Users/caio/.pyenv/versions/2.7.12/envs/ph/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Users/caio/.pyenv/versions/2.7.12/envs/ph/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "/Users/caio/.pyenv/versions/2.7.12/envs/ph/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/Users/caio/.pyenv/versions/2.7.12/envs/ph/lib/python2.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/Users/caio/.pyenv/versions/2.7.12/envs/ph/lib/python2.7/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/Users/caio/.pyenv/versions/2.7.12/envs/ph/lib/python2.7/site-packages/pip/req/req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/Users/caio/.pyenv/versions/2.7.12/envs/ph/lib/python2.7/site-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/l8/gl87lhfn54b62j4j31x62j0r0000gn/T/pip-build-WMU0qV/drfdocs/

from django-rest-framework-docs.

digitaldavenyc avatar digitaldavenyc commented on May 31, 2024

+1 for this issue. Have the same error on Docker Alpine Python 2.7

from django-rest-framework-docs.

suriya avatar suriya commented on May 31, 2024

I run into the same issue as well. This seems to depend on the Python environment being used.

On vanilla Ubuntu 16.04, I created a virtual environment using python3.5 -m venv env-dir and I was able to install drfdocs.

However, in a different Python environment setup using miniconda, I ran into the above mentioned error.

pip install drfdocs==0.0.11
Collecting drfdocs==0.0.11
  Using cached drfdocs-0.0.11.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named 'setuptools'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-odatsxp2/drfdocs/

from django-rest-framework-docs.

taelimoh avatar taelimoh commented on May 31, 2024

same issue for me. cannot install versions after 0.0.9

from django-rest-framework-docs.

bllli avatar bllli commented on May 31, 2024

same error
using Ubuntu14.04 with anaconda venv
python version: Python 3.6.3 :: Anaconda, Inc.
pip version: pip 9.0.1 from /home/bllli/venv/ikm/lib/python3.6/site-packages (python 3.6)

Collecting drfdocs
  Using cached drfdocs-0.0.11.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ej4br7ae/drfdocs/

but I can import setuptools with python

Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import setuptools
>>> setuptools
<module 'setuptools' from '/home/bllli/venv/ikm/lib/python3.6/site-packages/setuptools/__init__.py'>
>>> 

from django-rest-framework-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.