How do I install the latest version of pytest, coexisting with an older version? - version

Here is my current version
% pytest --version
This is pytest version 4.6.9, imported from /home/abc/.local/lib/python2.7/site-packages/pytest.pyc
Per https://docs.pytest.org/en/latest/announce/index.html, the latest version is pytest-5.4.1.
I ran % pip install --upgrade pytest but my pytest version still remains as 4.6.9. Ideally, I'd like to be able to install the latest version separately, something like pytest3.
I have both python 2.x and 3.x on my machine.

Have you tried uninstalling pytest
python3 windows
pip uninstall pytest
python3 linux
pip3 uninstall pytest
then install again
pip install pytest
or
download whl file from
https://pypi.org/project/pytest/#files
download the pytest-5.4.1-py3-none-any.whl
package.
then go to terminal or cmd for windows.
commands:
pip3 uninstall pytest
cd Desktop
pip3 install pytest-5.4.1-py3-none-any.whl
or
pip uninstall pytest
cd Desktop
pip install pytest-5.4.1-py3-none-any.whl
please tell me if you want me to explain more

Related

Error while installing snowflake connector for python

I am trying to connect snowflake using python, I tried to install "Snowflake connector" for python using below command:
pip install snowflake-connector-python
https://docs.snowflake.com/en/user-guide/python-connector.html
During installation I am facing following error:
ERROR: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly
Even I faced similar error while installing snowflake connector for python and I used below command and issue got resolved:
python3 -m pip install --no-use-pep517 snowflake-connector-python
Python 3 I have no issue. Only with Python 2.7.
Try this if you are using python3. It is the documenation.
sudo python3 -m pip install setuptools-rust
sudo python3 -m pip install wheel
sudo python3 -m pip install -r https://raw.githubusercontent.com/snowflakedb/snowflake-connector-python/v2.3.9/tested_requirements/requirements_36.reqs
sudo python3 -m pip install snowflake-connector-python==2.3.9

Error Trying to Install React on Windows 10

I'm trying to install react on windows 10 using npm install -g create-react-app.
The install fails and I get the following error message:
Error: EINVAL: invalid argument, mkdir 'C:\Program Files\Git\'C:\Users\User\AppData\Roaming\npm''
I should mention that I installed nodejs version 12.16.3 LTS on my windows machine right before I got this error.
Does anyone know why this is, or if there's a solution to this problem?
Please help!
First of all you are not trying to install react. You are trying to install create-react-app terminal tool. With that tool you can easily create react projects.
Let's do some checks first.
# Remove if you have installed it before
npm uninstall -g create-react-app
# Check if you have installed 'git' (if not install git)
git --version
# Check node.js (if not install node.js)
node --version
# Check npm (if not install npm)
npm --version
If they are all installed, now you can start installing create-react-app. I am not windows user but i would suggest you to use powershell. On linux i would use sudo command for this install.
# install create-react-app
npm install -g create-react-app
# check if it is installed
create-react-app --version

How to install boto3 on Ubuntu 18.04?

How do you install boto3 on Ubuntu 18.04?
I tried this:
# pip install boto3
Command 'pip' not found, but can be installed with:
apt install python-pip
# apt install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pip
#
Partial answer found at https://askubuntu.com/questions/672808/sudo-apt-get-install-python-pip-is-failing
sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install python3-pip
Do not run pip install --upgrade pip, otherwise the following steps are also needed:
from https://github.com/pypa/pip/issues/5240
vi /usr/bin/pip3
change the broken from pip import main import to
from pip._internal import main
and then finally
pip3 install boto3
it's quite simple, just install it from the terminal
apt install python-boto3
The log you posted informs you that the commands pip and python-pip are not already installed. So, if you still use python 2 (do not recommend), you can install pip or python-pip
sudo apt-get install pip
sudo apt-get install python-pip
and then install boto3: sudo pip install boto3.
Otherwise, if you already use Python 3, you can just install pip3 or python3-pip
sudo apt-get install pip3
sudo apt-get install python3-pip
and then install boto3: sudo pip3 install boto3

How to install node.js & angular.js on a google instance

How do i install node.js & angular.js on a google instance running CentOS7
I can't find Instructions that work. The instance has no GUI installed
Regards
You can access CentOS terminal and download dependencies, like in freshly installed Ubuntu we use apt-get install npm and apt-get install node to install npm and node and then with npm we can install further packages.
Use terminal for this, check this if this helps you How To Install Node.js on a CentOS 7 server
Once npm install is done, you can install angularJS or any other npm packages.
Hope it helps you

pip install dronekit --upgrade does not work

I am trying to upgrade my Dronekit 2.0.0rc.4
As of 10 minutes ago, they are up to 2.0.0cr.10
I need this version because apparently the older versions don't have a way to adjust baud rate when using 3DR radios.
I try
pip install dronekit --upgrade
but get message that I am already up-to-date.
Please advise.
Windows 8.1
Thanks!
Try pip install dronekit -UI. It ignores installed versions and any "apparent" requirements are in your environment. I also recommend pip uninstall dronekit; pip install dronekit as the easiest mechanism to avoid pip woes.
try
pip install --pre dronekit

Resources