I am trying to compile a python program (by running "python file.py"), but it gives me the error of "No module named open3d". I have installed open3d on my Mac system using "pip3 install open3d-python". I am also running python 3.10.4 64 bit.
I reinstalled python 3.10 and that comes with pip, so I am pretty sure that when I use pip to install packages they go in the same place. My vscode also doesn't show any errors when I am interpreting using 3.10, unlike 3.9 where there are yellow squiggles below my import line.
I have looked at other posts about a module not found but their fixes don't seem to work for me.
open3d library is currently not available for python version 3.10. I am solve it by installing with python 3.8.
The supported environment for open3d:
Supported Python versions:
3.6
3.7
3.8
3.9
Supported operating systems:
Ubuntu 18.04+
macOS 10.15+
Windows 10 (64-bit)
If you have other Python versions or operating systems, please refer to Build from source and compile Open3D from source.
Why did you install open3d with pip3 install open3d-python?
The official instruction gives pip3 install open3d.
Did you run your python via python in cmd? Maybe trying python3 could help.
pip install open3d work for me.
Related
I have a Raspberry Pi 3 with Raspbian and I upgraded python version from 3.7 to 3.8. If I type python --version in the terminal the correct version appears as the system version. However none of the modules that I have installed AFTER the version change seem to work. Python gives ModuleNotFoundError when trying to import ANY of the modules that I have installed.
I can see the modules with pip freeze but Python seems to not be able to find them.
I followed this instructions to purge 3.7. I reinstalled pip after purging python 3.7 but pip as again installed in /home/pi/.local/lib/python3.7/site-packages/pip. How can I get rid of 3.7 completely?
python3.8 -m pip install SomePackage # specifically Python 3.8 should work.
More documentation here: https://docs.python.org/3/installing/index.html#work-with-multiple-versions-of-python-installed-in-parallel
Just to summarize the comments and suggestions from other answers:
The problem I have was caused by the fact that even I had set Python 3.8 as default and python -v was pointing to Python 3.8 the pip script was installing modules for Python 3.7.
The suggested solution was to use pip3.8 (or whatever version someone might have) to install packages for that equivalent Python version and that works good.
Ideally best option if someone wants to have multiple versions of python is to use pyenv. You can create multiple virtual environments with multiple python versions.
However Do not uninstall the default Python. I have also tried to uninstall the default Python 3.7 to avoid having two versions of python 3 and keeping track of which module is installed where. This was a bad idea. I did not know that many Linux distributions have applications which use the default Python. You might get a black screen and who knows what other problems see this discussion Removed Python 3 on 18.04, how can I fix my system?
I'm quite new to Ubuntu. On my machine, running Ubuntu 20.04 with Python 3.8, I'm trying to run a program which does not support Python 3.8, but it requires Python 3.7 (FYI, it is Carla Simulator).
I need pygame, but when installing it through pip (python3.7 -m pip install pygame) it raises an error:
ModuleNotFoundError: No module named 'distutils.util'
Now, I have distutils correctly installed and updated at version 3.8.2-1ubuntu1.
Is there any way for me to install a distutils version compatible with Python 3.7 without affecting Python 3.8 and related modules? Or do you have hany suggestion to get pygame for Python 3.7 and running Carla somehow? Could a virtual environment help?
My question is really similar to this one How to install python-distutils but I don't actually require distutils, I just need the program to work...
Thank you
----- EDIT -----
I tried creating a virtual environment using venv, but I got an error due tue unavailability of ensurepip. Googling it, I found it might be related to the fact that my Python 3.7 version might have been installed through Anaconda (I actually can't remember). Running apt-cache rdepends python3.7 I get:
python3.7
Reverse Depends:
python3.7-minimal
Is it safe to completely uninstall current Python3.7 and reinstall it to hopefully get ensurepip? Any suggested code to safely do it?
The easiest solution for you would be to run your program in a virtual environment where you would specify the default python version to be 3.7 I think (see Use different Python version with virtualenv for an example). You can then install all your dependencies inside this environment and not have to deal with any conflicts between the two versions on Python.
Using pyenv you could specify the python version you want to use.
for example:
create a new folder and hit:
pyenv local 3.7.2
then create your virtual env by using pipenv:
pipenv install
then start your journey to building your game.
hope it help.
I want to install jupyter on Win 10. I have been using python on linux, but this is my first time on Win 10.
when I execute python -m pip install jupyter on administrator, I got errors like this:
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
any idea?
I have been able to get around this error by installing Anaconda, uninstalling Python 3.8.0 and installing Python 3.7.5 instead.
The Jupyter installation then ran successfully when I executed pip install jupyter with Git Bash in my C:\ drive using pip 19.2.3 (the default with Python 3.7.5).
For those who encounter this and need to use Python 3.8+, make sure to update you setuptools to version 42.0.0 (or later).
Install a version earlier than python 3.8 and the installation will work. Use CMD.
I had the same problem, I am using 64-bit windows 10 but downloaded the 32-bit python installer because it is the default that appears on the 'downloads' page on the python.org site. Uninstalled python 3.8.1, downloaded the 64-bit installer instead, and then ran 'pip install jupyterlab' using the pip version 19.2.3 that got installed with the 64-bit python instead of upgrading to pip version 19.3.1. So if you are running a 64-bit version of windows, make sure you download the 64-bit python installer!
I am trying to install hpelm on my machine via pip install hpelm but getting this error - image of the error thrown in commandline while installing. I tried lots of things to solve it like:
1.Installing anaconda
2.Uninstalling anaconda and installing python 3.7 (64-bit) from python.org and then installing numpy+mkl, scipy, scikitlearn from the windows binary hosted by Christoph Gohlke (link).
3.Installing numpy, scipy, scikit-learn via pip install 'package_name'
None of the above methods worked. I'm using Windows-10 (64-bit), Python 3.7.1 (64-bit). I have wasted hours on it. Is there something basic that I might be missing? I'm kinda new to this. Please help me install this package.
This is a problem with Python3.7, as seen in this Github thread. It works fine if you try on Python 3.6. I installed it fine on Python3.6.7.
I installed py-opencv in Bash for Windows 10 using Anaconda:
conda install -c conda-forge opencv
But when I import it in my Python3 interpreter, I get the following error:
ImportError: libopencv_reg.so.3.1: cannot enable executable stack as shared object requires: Invalid argument
It works fine on my Ubuntu machine so I figure this is a bug with Bash for Windows 10. If anyone has a work around it would be great.
Probably you have already found a solution, given the time that passed since you asked the question.
I faced the same problem and the solution in my case was installing opencv-python, which makes the bindings between OpenCV and Python. To install use the command sudo pip install opencv-python.
Works in the latest Windows build.