In my computer there are both python 3.9.1 which I downloaded myself and 3.9.7 which comes along with anaconda. And I faced problems when I wanted to install package into one of them. Currently I used python3.9 -m pip install pack_name to install the package. But it does not differentiate 1 or 7. It seems it will try to install for both. Also when I type python3.9 -V it shows 3.9.7 in computer's terminal but shows 3.9.1 in vscode's terminal... I tried to change version in Python:select interpreter of vscode but it made no difference. I tried python3.9.1 ... but that is not a command;(.
Is there any way to specifically use one of them?
Related
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.
i hope this question somehow fits in here.
Short: Can't install Spyder 4.2.1 using anaconda. However, I can install stand alone Spyder 4.2.1 but then i don't know how to install packages as the terminal/pip won't find the python from the stand alone Spyder.
long: Spyder 4.2.1 seems to be the first version that is supported on BIGsur. However, when I installed anaconda, it came with Spyder 4.1.5. I tried conda -update Spyder in the terminal and I got Spyder 4.2.0. This version is still super laggy and has high typing latency in the editor.
Trying the same again shows latest version already installed. Same for trying: conda -update anaconda.
Spyder4.2.1 was only released a few days ago. Is it possible it takes a while until anaconda supports it? If so, how long would it take (days, weeks or months?). My google searches had no results regarding this.
Since 4.2.0 the Spyder developers recommend the stand alone installers, which I understand as using Spyder without anaconda. I installed Spyder 4.2.1 and the typing in the editor was indeed super smooth. But now i couldn't properly install packages like pandas.
I also noticed that when i run spyder from anaconda the first line in the console indicates python 3.8 but when i run the stand alone spyder4.2.1 it says python 3.9.
The terminal only "recognizes" the 3.8 version. At least I can run Python3.8 in the Terminal but trying to run Python3.9 gives zsh: command not found error. (when it comes to install packages, developers recommend conda again. But this only updates the built in Spyder packages not the stand alone Spyder...
I realized the Python3.9 version is located in the spyder.app-file. I am super new to macOS and was quiet surprised when i found out, that what i thought was a launching icon was also a directory. Anyway using pip -install seems to only install packages for the python3.8 version.
With --target I tried to install the package into the spyder.app directory. Now I'm afraid it installs the wrong version of pandas. In the terminal it said it installed pandas 0.24 which is quiet outdated. I have also Python 2.7 installed and I feel like the pandas version i got matches python2.7.
So i tried to install the python3.9 version (using: python3.9 -m pip install), but since the terminal doesn't recognize this version it says command does not exist.
The message from Spyder after "import pandas" is around 100 lines, i copied the red highlighted ones:
ModuleNotFoundError: No module named 'pandas._libs.tslibs.base'
KeyError: 'pandas._libs.tslibs.conversion'
KeyError: 'pandas._libs.missing'
KeyError: 'pandas._libs.hashtable'
KeyError: 'pandas._libs.interval'
Has anyone installed Spyder 4.2.1 using anaconda or knows how to install packages for the stand alone version?
My current solution is to change spyders4.2.1 python environment to the python I installed seperately. Now I can install packages with pip install.
I am trying to setup Python 3 on my mac computer and I seem to have many versions of pip on my computer, not sure which I should be using.
When I run pip --version in the terminal I get pip 19.2.3 from /Library/Python/2.7/site-packages/pip-19.2.3-py2.7.egg/pip (python 2.7) which I am fairly certain is just the version that comes with mac os.
When I run python3 -m pip --version I get pip 20.1.1 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
When I run pip3 --version I then get pip 19.0.3 from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
I was hoping somebody could explain the differences between
The first and third pips seem to be from the OS (assuming you're on Catalina?) and the second one seems to be the one you've installed.
See
https://docs.python.org/3/using/mac.html
and
Python 3.7.3 Inadvertently Installed on Mac OS 10.15.1 - Included in Xcode Developer Tools 11.2 Now?
The quick and nasty answer is each installation of python can have its own pip, which in turn will have a different pipenv. This is all based off of your path. Most people opt to use virtualenv to create an app specific python environment so as to not impact other python applications which depend on specific conflicting versions.
I'm new to programming and following a course where I must install Tensorflow. The issue is that I'm using Python 3.8 which I understand isn't supported by Tensorflow.
I've downloaded Python 3.6 but I don't know how to switch this as my default version of python.
Would it be best to set up a venv using python 3.6 for my program and install Tensorflow in this venv?
Also, I using Windows and Powershell.
Tensorflow is only supported until python 3.7 as of now.
You can check it here: https://www.tensorflow.org/install/pip
But there is a way to install it on Python3.8, just run the below command that will do your job:
python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
This command work on mac and windows both, I haven't tested on Linux.
You should always use venv because by default every project on your system will use these same directories to store and retrieve site packages (third party libraries). At first glance, this may not seem like a big deal, and it isn’t really, for system packages (packages that are part of the standard Python library), but it does matter for site packages.
Consider the following scenario where you have two projects: ProjectA and ProjectB, both of which have a dependency on the same library, ProjectC. The problem becomes apparent when we start requiring different versions of ProjectC. Maybe ProjectA needs v1.0.0, while ProjectB requires the newer v2.0.0.
You can also take a look at anaconda, it’s the most populasr data sciencie platform and will be easy for you install tensorflow and jupiter notebook in just 2 clicks. Anaconda
Uninstall all your python versions and use the latest anaconda.
$ conda create --name tensorflow python=3.5
This way you create a virtual environment with python 3.5 which is supported by tensorflow.
So now you can install it.
$ activate tensorflow
(tensorflow) $ pip install tensorflow
it would have been nice if you would have the share the error screenshot
though as per i got the case
tensorflow work in both 3.8 and 3.6 just you have to check that you have 64bit version not 32 bit
you can acess both version from thier respective folder no need to install a venv
If you don't want to use Anaconda or virtualenv, then actually multiple Python versions can live side by side. I use Python38 as my default and Python35 for TensorFlow until they release it for Python38. If you wish to use the "non-default" Python, just invoke with the full path of the python.exe (or create a shortcut/batch file for it). Python then will take care of using the correct Python libs for that version.
Worked on Python 3.8.2 (default, Mar 05 2020, 18:58:42) [GCC] on linux
pip3 install --upgrade tf-nightly
Python Versions 3.5 - 3.8 are supported now.
You can verify on this page:
https://www.tensorflow.org/install/pip
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!