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

The 'pip install -e .' command doesn't work #86

Open
charlesdong opened this issue May 27, 2017 · 12 comments
Open

The 'pip install -e .' command doesn't work #86

charlesdong opened this issue May 27, 2017 · 12 comments

Comments

@charlesdong
Copy link

charlesdong commented May 27, 2017

I'm on Windows 10 (x64) and I use Python 3.6.1. I set the directory to this project's directory and used the following command:

pip install -e .

And I got an UnicodeDecodeError. But the following command is OK for me:

python setup.py develop

After using this command I can run Pycraft successfully.

@mrpudn
Copy link
Contributor

mrpudn commented May 30, 2017

Hmm, that's strange - it works for me on my mac:

pycraft $ python3 --version
Python 3.6.1

pycraft $ virtualenv venv -p python3
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/...'
New python executable in /...
Also creating executable in /...
Installing setuptools, pip, wheel...done.

pycraft $ . venv/bin/activate

(venv) pycraft $ pip install -e .
Obtaining file:///...
Collecting future (from pycraft==0.1.0)
  Downloading future-0.16.0.tar.gz (824kB)
    100% |████████████████████████████████| 829kB 497kB/s 
Collecting pyglet (from pycraft==0.1.0)
  Downloading pyglet-1.2.4-py3-none-any.whl (964kB)
    100% |████████████████████████████████| 972kB 514kB/s 
Collecting noise (from pycraft==0.1.0)
  Downloading noise-1.2.2.tar.gz (125kB)
    100% |████████████████████████████████| 133kB 747kB/s 
Building wheels for collected packages: future, noise
  Running setup.py bdist_wheel for future ... done
  Stored in directory: /...
  Running setup.py bdist_wheel for noise ... done
  Stored in directory: /...
Successfully built future noise
Installing collected packages: future, pyglet, noise, pycraft
  Running setup.py develop for pycraft
Successfully installed future-0.16.0 noise-1.2.2 pycraft pyglet-1.2.4

@charlesdong
Copy link
Author

Well, is it because I don't use a virtualenv? But I only use one version of Python.

@mrpudn
Copy link
Contributor

mrpudn commented Jun 18, 2017

Possibly, but that stuff should be fairly standard, virtualenv or not. It might be Windows-related - I'm on Mac, so that's the only difference I can see.

@hodgej
Copy link

hodgej commented Jan 20, 2019

Same error. I clicked enter and it worked for me.

@r58Playz
Copy link

On windows using git bash:

toshi@DESKTOP-8GVCHID MINGW64 ~/M/pycraft-master
$ pip install pycraft
Collecting pycraft
  Using cached https://files.pythonhosted.org/packages/70/7d/ebad9f0ed61b2120edbcbbb7baa48b5399cb306ded7e82ab77e5280d8c05/PyCraft-1503040.tar.bz2
Installing collected packages: pycraft
  Running setup.py install for pycraft ... error
    Complete output from command "c:\program files (x86)\python37-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\toshi\\AppData\\Local\\Temp\\pip-install-15nola4s\\pycraft\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\toshi\AppData\Local\Temp\pip-record-qi6iexrx\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib
    creating build\lib\pycraft
    copying Src\anvil.py -> build\lib\pycraft
    copying Src\geometry.py -> build\lib\pycraft
    copying Src\low.py -> build\lib\pycraft
    copying Src\nbt.py -> build\lib\pycraft
    copying Src\__init__.py -> build\lib\pycraft
    running install_lib
    creating c:\program files (x86)\python37-32\Lib\site-packages\pycraft
    copying build\lib\pycraft\anvil.py -> c:\program files (x86)\python37-32\Lib\site-packages\pycraft
    copying build\lib\pycraft\geometry.py -> c:\program files (x86)\python37-32\Lib\site-packages\pycraft
    copying build\lib\pycraft\low.py -> c:\program files (x86)\python37-32\Lib\site-packages\pycraft
    copying build\lib\pycraft\nbt.py -> c:\program files (x86)\python37-32\Lib\site-packages\pycraft
    copying build\lib\pycraft\__init__.py -> c:\program files (x86)\python37-32\Lib\site-packages\pycraft
    byte-compiling c:\program files (x86)\python37-32\Lib\site-packages\pycraft\anvil.py to anvil.cpython-37.pyc
    byte-compiling c:\program files (x86)\python37-32\Lib\site-packages\pycraft\geometry.py to geometry.cpython-37.pyc
    byte-compiling c:\program files (x86)\python37-32\Lib\site-packages\pycraft\low.py to low.cpython-37.pyc
    byte-compiling c:\program files (x86)\python37-32\Lib\site-packages\pycraft\nbt.py to nbt.cpython-37.pyc
    byte-compiling c:\program files (x86)\python37-32\Lib\site-packages\pycraft\__init__.py to __init__.cpython-37.pyc
    running install_data
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\toshi\AppData\Local\Temp\pip-install-15nola4s\pycraft\setup.py", line 42, in <module>
        keywords = ["Minecraft"],
      File "c:\program files (x86)\python37-32\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\program files (x86)\python37-32\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\program files (x86)\python37-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\program files (x86)\python37-32\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "c:\program files (x86)\python37-32\lib\distutils\command\install.py", line 557, in run
        self.run_command(cmd_name)
      File "c:\program files (x86)\python37-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\program files (x86)\python37-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\program files (x86)\python37-32\lib\distutils\command\install_data.py", line 56, in run
        dir = convert_path(f[0])
      File "c:\program files (x86)\python37-32\lib\distutils\util.py", line 110, in convert_path
        raise ValueError("path '%s' cannot be absolute" % pathname)
    ValueError: path '/usr/share/doc/pycraft' cannot be absolute

    ----------------------------------------
Command ""c:\program files (x86)\python37-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\toshi\\AppData\\Local\\Temp\\pip-install-15nola4s\\pycraft\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\toshi\AppData\Local\Temp\pip-record-qi6iexrx\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\toshi\AppData\Local\Temp\pip-install-15nola4s\pycraft\
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

toshi@DESKTOP-8GVCHID MINGW64 ~/M/pycraft-master
$ python setup.py develop
running develop
running egg_info
creating pycraft.egg-info
writing pycraft.egg-info\PKG-INFO
writing dependency_links to pycraft.egg-info\dependency_links.txt
writing entry points to pycraft.egg-info\entry_points.txt
writing requirements to pycraft.egg-info\requires.txt
writing top-level names to pycraft.egg-info\top_level.txt
writing manifest file 'pycraft.egg-info\SOURCES.txt'
reading manifest file 'pycraft.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pycraft.egg-info\SOURCES.txt'
running build_ext
Creating c:\program files (x86)\python37-32\lib\site-packages\pycraft.egg-link (link to .)
Adding pycraft 0.1.0 to easy-install.pth file
Installing pycraft-script.py script to C:\Program Files (x86)\Python37-32\Scripts
Installing pycraft.exe script to C:\Program Files (x86)\Python37-32\Scripts
Installing pycraft.exe.manifest script to C:\Program Files (x86)\Python37-32\Scripts

Installed c:\users\toshi\m\pycraft-master
Processing dependencies for pycraft==0.1.0
Searching for noise
Reading https://pypi.org/simple/noise/
Downloading https://files.pythonhosted.org/packages/33/80/5741a56563690255933ed5ca4e7fa9453c6a309e052ee2eac3b18a823b58/noise-1.2.2.zip#sha256=36036cdaca131ddd2ab4397fba649af7f074ec08031e1e0a51031d0ae23b509a
Best match: noise 1.2.2
Processing noise-1.2.2.zip
Writing C:\Users\toshi\AppData\Local\Temp\easy_install-xujzdkfo\noise-1.2.2\setup.cfg
Running noise-1.2.2\setup.py -q bdist_egg --dist-dir C:\Users\toshi\AppData\Local\Temp\easy_install-xujzdkfo\noise-1.2.2\egg-dist-tmp-0sp55qow
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.o' found anywhere in distribution
warning: no files found matching '*.txt' under directory 'examples'
warning: no files found matching '*.png' under directory 'examples'
_simplex.c
_simplex.c(235): warning C4244: 'return': conversion from 'double' to 'float', possible loss of data
_simplex.c(296): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
_simplex.c(297): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
_simplex.c(308): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
_simplex.c(309): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
   Creating library build\temp.win32-3.7\Release\_simplex.cp37-win32.lib and object build\temp.win32-3.7\Release\_simplex.cp37-win32.exp
Generating code
Finished generating code
_perlin.c
_perlin.c(11): warning C4005: 'inline': macro redefinition
c:\users\toshi\appdata\local\temp\easy_install-xujzdkfo\noise-1.2.2\_noise.h(7): note: see previous definition of 'inline'
_perlin.c(93): warning C4244: 'function': conversion from 'int' to 'float', possible loss of data
_perlin.c(94): warning C4244: 'function': conversion from 'int' to 'float', possible loss of data
_perlin.c(170): warning C4244: 'function': conversion from 'const int' to 'float', possible loss of data
_perlin.c(171): warning C4244: 'function': conversion from 'const int' to 'float', possible loss of data
_perlin.c(172): warning C4244: 'function': conversion from 'const int' to 'float', possible loss of data
_perlin.c(173): warning C4244: 'function': conversion from 'int' to 'float', possible loss of data
_perlin.c(173): warning C4244: 'function': conversion from 'const int' to 'float', possible loss of data
_perlin.c(174): warning C4244: 'function': conversion from 'int' to 'float', possible loss of data
_perlin.c(174): warning C4244: 'function': conversion from 'const int' to 'float', possible loss of data
_perlin.c(175): warning C4244: 'function': conversion from 'int' to 'float', possible loss of data
_perlin.c(175): warning C4244: 'function': conversion from 'const int' to 'float', possible loss of data
   Creating library build\temp.win32-3.7\Release\_perlin.cp37-win32.lib and object build\temp.win32-3.7\Release\_perlin.cp37-win32.exp
Generating code
Finished generating code
zip_safe flag not set; analyzing archive contents...
noise.__pycache__._perlin.cpython-37: module references __file__
noise.__pycache__._simplex.cpython-37: module references __file__
creating c:\program files (x86)\python37-32\lib\site-packages\noise-1.2.2-py3.7-win32.egg
Extracting noise-1.2.2-py3.7-win32.egg to c:\program files (x86)\python37-32\lib\site-packages
Adding noise 1.2.2 to easy-install.pth file

Installed c:\program files (x86)\python37-32\lib\site-packages\noise-1.2.2-py3.7-win32.egg
Searching for pyglet==1.3.2
Best match: pyglet 1.3.2
Adding pyglet 1.3.2 to easy-install.pth file

Using c:\program files (x86)\python37-32\lib\site-packages
Searching for future==0.17.1
Best match: future 0.17.1
Adding future 0.17.1 to easy-install.pth file
Installing futurize-script.py script to C:\Program Files (x86)\Python37-32\Scripts
Installing futurize.exe script to C:\Program Files (x86)\Python37-32\Scripts
Installing futurize.exe.manifest script to C:\Program Files (x86)\Python37-32\Scripts
Installing pasteurize-script.py script to C:\Program Files (x86)\Python37-32\Scripts
Installing pasteurize.exe script to C:\Program Files (x86)\Python37-32\Scripts
Installing pasteurize.exe.manifest script to C:\Program Files (x86)\Python37-32\Scripts

Using c:\program files (x86)\python37-32\lib\site-packages
Finished processing dependencies for pycraft==0.1.0

toshi@DESKTOP-8GVCHID MINGW64 ~/M/pycraft-master
$ pycraft
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\Scripts\pycraft-script.py", line 11, in <module>
    load_entry_point('pycraft', 'console_scripts', 'pycraft')()
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\pkg_resources\__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\pkg_resources\__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\pkg_resources\__init__.py", line 2346, in load
    return self.resolve()
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\pkg_resources\__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'pycraft.main'

toshi@DESKTOP-8GVCHID MINGW64 ~/M/pycraft-master
$

@r58Playz
Copy link

pip install e:

toshi@DESKTOP-8GVCHID MINGW64 ~/M/pycraft-master
$ pip install -e

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

-e option requires 1 argument

toshi@DESKTOP-8GVCHID MINGW64 ~/M/pycraft-master
$ pip install -e pycraft
Directory 'pycraft' is not installable. File 'setup.py' not found.
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

toshi@DESKTOP-8GVCHID MINGW64 ~/M/pycraft-master
$ cd ..

toshi@DESKTOP-8GVCHID MINGW64 ~/M
$ pip install -e pycraft-master
Obtaining file:///C:/Users/toshi/M/pycraft-master
Requirement already satisfied: future in c:\program files (x86)\python37-32\lib\site-packages (from pycraft==0.1.0) (0.17.1)
Requirement already satisfied: pyglet in c:\program files (x86)\python37-32\lib\site-packages (from pycraft==0.1.0) (1.3.2)
Requirement already satisfied: noise in c:\program files (x86)\python37-32\lib\site-packages\noise-1.2.2-py3.7-win32.egg (from pycraft==0.1.0) (1.2.2)
Installing collected packages: pycraft
  Found existing installation: pycraft 0.1.0
    Uninstalling pycraft-0.1.0:
      Successfully uninstalled pycraft-0.1.0
  Running setup.py develop for pycraft
Successfully installed pycraft
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

toshi@DESKTOP-8GVCHID MINGW64 ~/M
$ pycraft
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\Scripts\pycraft-script.py", line 11, in <module>
    load_entry_point('pycraft', 'console_scripts', 'pycraft')()
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 2346, in load
    return self.resolve()
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'pycraft.main'

toshi@DESKTOP-8GVCHID MINGW64 ~/M
$

@r58Playz
Copy link

I am on Windows 10

toshi@DESKTOP-8GVCHID MINGW64 ~/M
$ python --version
Python 3.7.2

This is not on path:

toshi@DESKTOP-8GVCHID MINGW64 ~/M
$ C:/Python27/python.exe --version
Python 2.7.15

@traverseda
Copy link
Owner

@r58Playz wrong pycraft I think.

ammaraskar/pyCraft#63

@r58Playz
Copy link

nope I have pycraft-master and exact directory layout as master.

@r58Playz
Copy link

i meant pycraft-master folder

@r58Playz
Copy link

got it working with python -m pycraft

@r58Playz
Copy link

$ ls -rlt
total 549
-rw-r--r-- 1 toshi 197611    413 Jun 17 10:54 AUTHORS.rst
-rw-r--r-- 1 toshi 197611     73 Jun 17 10:54 CHANGES.rst
-rw-r--r-- 1 toshi 197611   1060 Jun 17 10:54 LICENSE
-rw-r--r-- 1 toshi 197611      0 Jun 17 10:54 MANIFEST.in
-rw-r--r-- 1 toshi 197611   3214 Jun 17 10:54 README.rst
-rw-r--r-- 1 toshi 197611      0 Jun 17 10:54 pytest.ini
-rw-r--r-- 1 toshi 197611     93 Jun 17 10:54 requirements-dev.txt
-rw-r--r-- 1 toshi 197611     43 Jun 17 10:54 requirements.txt
-rw-r--r-- 1 toshi 197611 521055 Jun 17 10:54 screenshot.png
-rw-r--r-- 1 toshi 197611    555 Jun 17 10:54 setup.cfg
-rwxr-xr-x 1 toshi 197611   3223 Jun 17 10:54 setup.py*
-rw-r--r-- 1 toshi 197611   1140 Jun 17 10:54 tox.ini
drwxr-xr-x 1 toshi 197611      0 Jun 17 10:54 docs/
drwxr-xr-x 1 toshi 197611      0 Jun 17 10:54 tests/
drwxr-xr-x 1 toshi 197611      0 Jun 17 11:00 pycraft.egg-info/
drwxr-xr-x 1 toshi 197611      0 Jun 17 11:30 pycraft/

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

5 participants