How to deal with errors when installing Python and pip with choco

tl; dr Even if you put python in choco, you can pass environment variables by yourself. If you want to use pip, put it in yourself.

trouble

After installing python3.7 using choco to install ROS2, on powershell

$ python

When you enter, the Microsoft Store opens.

Also, when I try to install pip with choco, I cannot install it due to an error.

Solution

First, after installing python

$ refreshenv

And reflect it.

After this, again

$ python

If the Microsoft Store opens even if you enter, you need to enter the environment variables yourself. In my case, there was a folder called python (version) directly under the C drive, so set this to the path of the environment variable. Then, python became usable.

Next, when I try to install pip with choco, I get an error. I forgot to take the error log at this time, so I will omit it.

In this case, download the pip installation script from the net. Execute the following in the folder where python is installed.

$ wget "https://bootstrap.pypa.io/get-pip.py" -O "get-pip.py"
$ python get-pip.py

Then, the Scripts folder will be created in the folder, so register this in the path of the environment variable as well. Then you can use pip.

reference

https://index.ros.org/doc/ros2/Installation/Eloquent/Windows-Install-Binary/ https://qiita.com/kangetsu121/items/b6352b547cd32e71bc65#%E5%8F%82%E8%80%83 https://bamch0h.hatenablog.com/entry/2019/09/29/162601

Recommended Posts

How to deal with errors when installing Python and pip with choco
How to deal with errors when hitting pip ②
How to deal with errors when installing whitenoise and deploying to Heroku
[Python] How to deal with module errors
How to deal with DistributionNotFound errors
Error when installing a module with Python pip
[Django] How to resolve errors when installing mysqlclient
How to deal with run-time errors in subprocess.call
How to deal with SessionNotCreatedException when using Selenium
How to deal with OAuth2 error when using Google APIs from Python
How to deal with SSL error when connecting to S3 with boto of Python
[Python] How to deal with pandas read_html read error
[Python] How to play with class variables with decorator and metaclass
[Linux] How to deal with garbled characters when viewing files
How to do Bulk Update with PyMySQL and notes [Python]
For beginners, how to deal with common errors in keras
How to deal with UnicodeDecodeError when executing google image download
How to log in to AtCoder with Python and submit automatically
How to deal with imbalanced data
How to get started with Python
How to use FTP with Python
How to calculate date with python
How to install mysql-connector with pip3
How to deal with python installation error in pyenv (BUILD FAILED)
How to not escape Japanese when dealing with json in python
How to import CSV and TSV files into SQLite with Python
Error and solution when installing python3 with homebrew on mac (catalina 10.15)
How to make a surveillance camera (Security Camera) with Opencv and Python
How to install pandas on EC2 (How to deal with MemoryError and PermissionError)
How to use Python with Jw_cad (Part 2 Command explanation and operation)
How to build Python and Jupyter execution environment with VS Code
How to package and distribute Python scripts
How to install and use pandas_datareader [Python]
Python installation and package management with pip
How to deal with the problem that the current directory moves when Python is executed from Atom
How to work with BigQuery in Python
[Python] What is pip? Explain the command list and how to use it with actual examples
How to display python Japanese with lolipop
A workaround when installing pyAudio with pip.
python: How to use locals () and globals ()
How to enter Japanese with Python curses
[Python] How to calculate MAE and RMSE
How to use Python zip and enumerate
How to use is and == in Python
How to install python3 with docker centos
[Introduction to Python] How to judge authenticity with if statement (True and None)
How to get the date and time difference in seconds with python
[AWS] How to deal with WordPress "An error occurred when cropping an image."
How to deal with old Python versions in Cloud9 made by others
How to deal with the problem that build fails when CI / CD of Python Function with AWS Amplify
How to upload with Heroku, Flask, Python, Git (4)
How to deal with memory leaks in matplotlib.pyplot
How to start Python (Flask) when EC2 starts
Scraping tabelog with python and outputting to CSV
MessagePack-Try to link Java and Python with RPC
How to enjoy programming with Minecraft (Ruby, Python)
[REAPER] How to play with Reascript in Python
Recommended environment and usage when developing with Python
How to do multi-core parallel processing with python
How to generate permutations in Python and C ++
Notes on installing Python3 and using pip on Windows7