Skip to content

Runtime error (ImportException): No module named ghpythonremote #45

Closed
@Supermonkey-design

Description

@Supermonkey-design

Hi @pilcru! Sorry to bother you, but i seem to be stuck at the installation step and really would like to try this amazing plugin.
I've followed meticulously the installation guide, but i'm also very new to all of this so i may do miss something easy.
Basically i've installed Anaconda3 (selecting "Add conda to my PATH"), created the env rhinoremote, activated it and run the provided commands.
Problems seem to happen when running the ghpyr configure ironpython installation: i've tried running the general one and the one with a specific folder, but this is what shows (in the conda prompt, win cmd prompt or powershell)

(rhinoremote) C:\Users\PREDATOR>conda env list
# conda environments:
#
base                     C:\Users\PREDATOR\anaconda3
rhinoremote           *  C:\Users\PREDATOR\anaconda3\envs\rhinoremote


(rhinoremote) C:\Users\PREDATOR>python -m ghpythonremote._configure_ironpython_installation ^
Ancora? "%APPDATA%\McNeel\Rhinoceros\7.0\Plug-ins\^
Ancora? IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib"
The gh-python-remote package will be installed in Rhino IronPython with the command:
C:\Users\PREDATOR\anaconda3\envs\rhinoremote\python.exe -m pip install --upgrade --target=C:\Users\PREDATOR\AppData\Roaming\McNeel\Rhinoceros\7.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib --no-compile --ignore-requires-python gh-python-remote
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting gh-python-remote
  Using cached https://files.pythonhosted.org/packages/0b/15/757df4424310efdfff9ed0fc314a613ef76d085067ab7666be90b3895556/gh_python_remote-1.4.4-py2-none-any.whl
Collecting rpyc==4.1.5
  Using cached https://files.pythonhosted.org/packages/36/a7/7898de583e17202ce02ac7ecffdbed95c72a6cebe468c1ee6fc94fc20933/rpyc-4.1.5-py2-none-any.whl
Collecting plumbum
  Using cached https://files.pythonhosted.org/packages/5f/c9/67b40a607f9815275c7867f9ec60700f442c186d3cca235156cb4fa19c33/plumbum-1.8.0.tar.gz
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_internal\cli\base_command.py", line 153, in _main
    status = self.run(options, args)
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_internal\commands\install.py", line 382, in run
    resolver.resolve(requirement_set)
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_internal\legacy_resolve.py", line 201, in resolve
    self._resolve_one(requirement_set, req)
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_internal\legacy_resolve.py", line 365, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_internal\legacy_resolve.py", line 313, in _get_abstract_dist_for
    req, self.session, self.finder, self.require_hashes
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_internal\operations\prepare.py", line 224, in prepare_linked_requirement
    req, self.req_tracker, finder, self.build_isolation,
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_internal\operations\prepare.py", line 49, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_internal\distributions\source\legacy.py", line 34, in prepare_distribution_metadata
    self.req.load_pyproject_toml()
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_internal\req\req_install.py", line 537, in load_pyproject_toml
    str(self)
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_internal\pyproject.py", line 66, in load_pyproject_toml
    pp_toml = pytoml.load(f)
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_vendor\pytoml\parser.py", line 11, in load
    return loads(fin.read(), translate=translate, object_pairs_hook=object_pairs_hook, filename=getattr(fin, 'name', repr(fin)))
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_vendor\pytoml\parser.py", line 24, in loads
    ast = _p_toml(src, object_pairs_hook=object_pairs_hook)
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_vendor\pytoml\parser.py", line 341, in _p_toml
    s.expect_eof()
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_vendor\pytoml\parser.py", line 123, in expect_eof
    return self._expect(self.consume_eof())
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\pip\_vendor\pytoml\parser.py", line 163, in _expect
    raise TomlError('msg', self._pos[0], self._pos[1], self._filename)
TomlError: c:\users\predator\appdata\local\temp\pip-install-pefua3\plumbum\pyproject.toml(69, 1): msg
Traceback (most recent call last):
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\site-packages\ghpythonremote\_configure_ironpython_installation.py", line 40, in <module>
    subprocess.check_call(pip_cmd)
  File "C:\Users\PREDATOR\anaconda3\envs\rhinoremote\lib\subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\PREDATOR\\anaconda3\\envs\\rhinoremote\\python.exe', '-m', 'pip', 'install', '--upgrade', '--target=C:\\Users\\PREDATOR\\AppData\\Roaming\\McNeel\\Rhinoceros\\7.0\\Plug-ins\\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\\settings\\lib', '--no-compile', '--ignore-requires-python', 'gh-python-remote']' returned non-zero exit status 2`

Also i can tell you that there is no file in: "%APPDATA%\McNeel\Rhinoceros\7.0\Plug-ins^
IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib" nor in "%APPDATA%\Grasshopper\UserObjects\gh-python-remote\examples" (but i do find them in rhinoremote env folder).
No ghpythonremote components appear, but i can drag it on from rhinoremote env folder as well (but as you can imagine, it doesn't work and outputs: Runtime error (ImportException): No module named ghpythonremote). I've tried giving the envlist path for the location input, but also doesn't work.

I really hope i'm not wasting your time with something really silly to solve, but i can't find what i'm doing wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions