(solved) Unable to install compute-rhino3d via pip

I got the following errors while installing compute-rhino3d via pip.

May I ask:

  1. What is the causing these errors?
  2. How to solve this issue to install compute-rhino3d successfully?

C:\Users\joe>pip3 install compute-rhino3d
Collecting compute-rhino3d
Requirement already satisfied: requests in c:\users\joe\appdata\roaming\python\python36\site-packages (from compute-rhino3d) (2.22.0)
Collecting rhino3dm (from compute-rhino3d)
Using cached https://files.pythonhosted.org/packages/54/dd/fb06abed53eda3c888dec4dd22b13759d96719bd11d491070b457ad48b1e/rhino3dm-0.8.1.tar.gz
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\joe\appdata\roaming\python\python36\site-packages (from requests->compute-rhino3d) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in c:\users\joe\appdata\roaming\python\python36\site-packages (from requests->compute-rhino3d) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\joe\appdata\roaming\python\python36\site-packages (from requests->compute-rhino3d) (2019.9.11)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\joe\appdata\roaming\python\python36\site-packages (from requests->compute-rhino3d) (1.25.7)
Building wheels for collected packages: rhino3dm
Building wheel for rhino3dm (setup.py) … error
ERROR: Command errored out with exit status 1:
command: ‘c:\python\python36\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\setup.py’"’"’; file=’"’"‘C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\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 ‘C:\Users\joe\AppData\Local\Temp\pip-wheel-90qqhep’ --python-tag cp36
cwd: C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm
Complete output (63 lines):
c:\python\python36\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: ‘long_description_content_type’
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\rhino3dm
copying src\rhino3dm_init
.py -> build\lib.win-amd64-3.6\rhino3dm
running egg_info
writing src\rhino3dm.egg-info\PKG-INFO
writing dependency_links to src\rhino3dm.egg-info\dependency_links.txt
writing top-level names to src\rhino3dm.egg-info\top_level.txt
reading manifest file ‘src\rhino3dm.egg-info\SOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no files found matching ‘.pyd’ under directory ‘src\rhino3dm’
warning: no files found matching '
.so’ under directory ‘src\rhino3dm’
writing manifest file ‘src\rhino3dm.egg-info\SOURCES.txt’
copying src\rhino3dm_init_.pyi -> build\lib.win-amd64-3.6\rhino3dm
copying src\rhino3dm\py.typed -> build\lib.win-amd64-3.6\rhino3dm
running build_ext
Traceback (most recent call last):
File “C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\setup.py”, line 32, in run
out = subprocess.check_output([‘cmake’, ‘–version’])
File “c:\python\python36\lib\subprocess.py”, line 336, in check_output
**kwargs).stdout
File “c:\python\python36\lib\subprocess.py”, line 403, in run
with Popen(popenargs, **kwargs) as process:
File “c:\python\python36\lib\subprocess.py”, line 709, in init
restore_signals, start_new_session)
File “c:\python\python36\lib\subprocess.py”, line 997, in execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\setup.py”, line 147, in
include_package_data=True
File "c:\python\python36\lib\site-packages\setuptools_init
.py", line 129, in setup
return distutils.core.setup(**attrs)
File “c:\python\python36\lib\distutils\core.py”, line 148, in setup
dist.run_commands()
File “c:\python\python36\lib\distutils\dist.py”, line 955, in run_commands
self.run_command(cmd)
File “c:\python\python36\lib\distutils\dist.py”, line 974, in run_command
cmd_obj.run()
File “c:\python\python36\lib\site-packages\wheel\bdist_wheel.py”, line 188, in run
self.run_command(‘build’)
File “c:\python\python36\lib\distutils\cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “c:\python\python36\lib\distutils\dist.py”, line 974, in run_command
cmd_obj.run()
File “c:\python\python36\lib\distutils\command\build.py”, line 135, in run
self.run_command(cmd_name)
File “c:\python\python36\lib\distutils\cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “c:\python\python36\lib\distutils\dist.py”, line 974, in run_command
cmd_obj.run()
File “C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\setup.py”, line 36, in run
", ".join(e.name for e in self.extensions))
RuntimeError: CMake must be installed to build the following extensions: rhino3dm/rhino3dm
ERROR: Failed building wheel for rhino3dm
Running setup.py clean for rhino3dm
Failed to build rhino3dm
Installing collected packages: rhino3dm, compute-rhino3d
Running setup.py install for rhino3dm … error
ERROR: Command errored out with exit status 1:
command: ‘c:\python\python36\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\setup.py’"’"’; file=’"’"‘C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\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\joe\AppData\Local\Temp\pip-record-qwdemvcm\install-record.txt’ --single-version-externally-managed --compile
cwd: C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm
Complete output (65 lines):
c:\python\python36\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: ‘long_description_content_type’
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\rhino3dm
copying src\rhino3dm_init
.py -> build\lib.win-amd64-3.6\rhino3dm
running egg_info
writing src\rhino3dm.egg-info\PKG-INFO
writing dependency_links to src\rhino3dm.egg-info\dependency_links.txt
writing top-level names to src\rhino3dm.egg-info\top_level.txt
reading manifest file ‘src\rhino3dm.egg-info\SOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no files found matching '
.pyd’ under directory ‘src\rhino3dm’
warning: no files found matching ‘*.so’ under directory ‘src\rhino3dm’
writing manifest file ‘src\rhino3dm.egg-info\SOURCES.txt’
copying src\rhino3dm_init_.pyi -> build\lib.win-amd64-3.6\rhino3dm
copying src\rhino3dm\py.typed -> build\lib.win-amd64-3.6\rhino3dm
running build_ext
Traceback (most recent call last):
File “C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\setup.py”, line 32, in run
out = subprocess.check_output([‘cmake’, ‘–version’])
File “c:\python\python36\lib\subprocess.py”, line 336, in check_output
**kwargs).stdout
File “c:\python\python36\lib\subprocess.py”, line 403, in run
with Popen(*popenargs, **kwargs) as process:
File “c:\python\python36\lib\subprocess.py”, line 709, in init
restore_signals, start_new_session)
File “c:\python\python36\lib\subprocess.py”, line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\setup.py", line 147, in <module>
    include_package_data=True
  File "c:\python\python36\lib\site-packages\setuptools\__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "c:\python\python36\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "c:\python\python36\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "c:\python\python36\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "c:\python\python36\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "c:\python\python36\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "c:\python\python36\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\python\python36\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "c:\python\python36\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "c:\python\python36\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\python\python36\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\setup.py", line 36, in run
    ", ".join(e.name for e in self.extensions))
RuntimeError: CMake must be installed to build the following extensions: rhino3dm/_rhino3dm

ERROR: Command errored out with exit status 1: ‘c:\python\python36\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\setup.py’"’"’; file=’"’"‘C:\Users\joe\AppData\Local\Temp\pip-install-pt9w4kf1\rhino3dm\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\joe\AppData\Local\Temp\pip-record-qwdemvcm\install-record.txt’ --single-version-externally-managed --compile Check the logs for full command output.

It looks like the package is being compiled. That is probably because I think the package is pre-compiled for Python 3.7

You’ll need to install cmake and a compiler toolset (visual studio) to be able to compile this package.

Or update your Python to 3.7 from 3.6

@will, would it be possible to set-up a number of python versions to build our pre-compiled packages for? I think probably at least 3.6 for a while, maybe even 3.5? With 2.x being phased out maybe leave that to the users themselves?

p.s. moved to better category.

1 Like

Thanks, Nathan.

I’m not familiar with the compiling related operations. But, I’ll try to upgrade my python from 3.6 to 3.7 as suggested.

FYI, I was following **Mr Junichiro Horikawa’s ** tutorial on how to use compute.rhino3d in Python:

You should be fine when you install Python 3 on your machine. I’ve played around with Python and compute.rhino3d, and didn’t have to compile anything from source.
Here’s a very good, cross-platform guide on how to install Python.

If you are a Rhino/Grasshopper user, compute.rhino3d might not be worth it for now, since using Python inside the applications is much more straightforward and feature rich. The rhino3dm module on the other hand has only very basic functionality (i.e. Points, Circles, etc.).

For anything beyond the basics (e.g. intersections, booleans, surface operations etc.), you need to connect to a compute.rhino server (locally or remotely). McNeel’s test server is currently freely available to users with an app license, which is great.

Why is Rhino- or Grasshopper Python more straightforward? Well each time you make an API call (contact the server to some processing), you get back “non-geometrical” information, a string of data that you then need to “decode”/cast to a geometry object again in order to be able to save it to a 3dm file or use it with the basic functionality of the rhino3dm module. This seems pretty cumbersome to me!

I only wonder how long it will take until Rhino will be a “cloud app”. Rhino Creative Cloud so to speak! :face_with_monocle:

1 Like

Thanks for sharing your thoughts, P1r4t3b0y

The issue has been resolved after uninstalling my python3.6, installing python3.7.5, and updating pip.

Install rhino3dm:

C:\Users\joe>pip install rhino3dm
Collecting rhino3dm
Downloading https://files.pythonhosted.org/packages/41/f8/efc2d9f7302e3dc336516ddd3e09df60b64f9b02a2115619ef1f3cb4a972/rhino3dm-0.8.1-cp37-cp37m-win_amd64.whl (1.6MB)
|████████████████████████████████| 1.6MB 252kB/s
Installing collected packages: rhino3dm
Successfully installed rhino3dm-0.8.1

Install compute-rhino3d:

C:\Users\joe>pip install compute-rhino3d
Collecting compute-rhino3d
Using cached https://files.pythonhosted.org/packages/1d/38/353d6281d134ab4c9fd93e2c6963bd98f561302417d25815e94fb229fd2a/compute_rhino3d-0.9.0.tar.gz
Collecting requests
Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Requirement already satisfied: rhino3dm in c:\users\joe\appdata\local\programs\python\python37\lib\site-packages (from compute-rhino3d) (0.8.1)
Collecting idna<2.9,>=2.5
Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Using cached https://files.pythonhosted.org/packages/b4/40/a9837291310ee1ccc242ceb6ebfd9eb21539649f193a7c8c86ba15b98539/urllib3-1.25.7-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17
Using cached https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl
Installing collected packages: idna, urllib3, chardet, certifi, requests, compute-rhino3d
Running setup.py install for compute-rhino3d … done
Successfully installed certifi-2019.9.11 chardet-3.0.4 compute-rhino3d-0.9.0 idna-2.8 requests-2.22.0 urllib3-1.25.7

Currently supported Python versions are 2.7(end of life in about 50 days), 3.5 (until September 2020) to 3.8 (brand spanking new)

Looks like @stevebaer has already published rhino3dm for Python 2.7, 3.7 and 3.8 (32- and 64-bit) on Windows. I think that’s plenty, personally!

I’ll update the CI builds to include 3.8.

As a side note, we got burnt by this a little when Python 3.8 was released three days before we taught a class on Compute at AEC Tech. Reminder not to include the “latest version of Python 3” in the class requirements!

1 Like

Cool. Note that OP uses 3.6, though.

Thanks to you the user was able to upgrade and the problem went away :). Are you seeing more requests from users who are unable to upgrade beyond 3.6?

Nah, I just succeeded to miss the update.