pipenv not installing any package? - pipenv

When I do the pip freeze I can see all the packages but when I do the pipenv install it is not installing any packages.
This is what I am getting when I do pipenv install.
Installing dependencies from Pipfile.lock (0a15b8)...
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00

I expect you are using pipenv virtual env as well for your project. I uninstalled all the packages from the env using: pipenv uninstall --all and then did pipenv install to install all the packages from pipfile and it worked.

Posting the solution for this, if someone is facing the same.
Just update your Pipfile.lock file by running the pipenv update Pipfile.lock, and then do the pipenv install.

Related

Yarn Unknown Syntax Error: Unsupported option name ("--check-files")

When I try to run yarn install --check-files on a rails repo that I cloned I'm getting the following error:
Unknown Syntax Error: Unsupported option name ("--check-files").
$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
I've tried updating yarn and node to the latest stable versions
I've tried deleting yarn/node modules and yarn.lock in the local folder and running yarn install again
I've tried yarn upgrade --latest which also brings up a similar error Usage Error: Couldn't find a script named "upgrade".
I'm currently using volta to manage my versions and have not had too much trouble up until now.
I've previously run --check-files on other repos with no problems.
Ok turns out my system was running yarn 3.* globally which was conflicting with my rails version (6.0.5). I had originally installed yarn using brew so I had to uninstall and start again with npm using the following steps:
brew uninstall yarn to remove yarn with brew
npm install -g yarn to install yarn with npm
yarn set version classic to set yarn version to 1.*
yarn -v to make sure I was on version 1.*

Yarn packages won't update for dependency issue

On a development server, for an application barely deployed, rails commands won't execute because of lack of integrity file.
error Couldn't find an integrity file
error Found 1 errors.
========================================
Your Yarn packages are out of date!
Please run `yarn install --check-files` to update.
========================================
Both
yarn install --check-files
yarn install
lead to the same error
compression-webpack-plugin#4.0.1: The engine "node" is incompatible with this module. Expected version ">= 10.13.0". Got "8.17.0"
Found incompatible module
Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
The 'visit' prompt is unfortunately of no use, as it does not deal with the node engine.
Being barely deployed, there is no node-modules directory yet, which is expected. However on development machine there is the directory and no issues whatseoever in precompiling assets.
Server context:
node -v
> v8.17.0
How can this situation be unblocked?
you need to update the node to a version higher than the one mentioned >= 10.13.0 then re-install yarn and re-run the check:
if you're on Mac OS:
brew install node#14 && brew link --force node#14
brew install yarn
if you're on Linux:
cd ~
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
then check if you have a compatible version
node -v
=> v14.2.0
``
if so re-run any of your commands:
```bash
yarn install --check-files
yarn install

How do I upgrade a pipenv package and ignore prerelease packages?

This fails ("Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.")
#!/usr/bin/env bash
pipenv install requests
pipenv install black --dev
pipenv update requests
The update fails because black only has pre-release versions.
# fails with warning
pipenv update requests --pre
# no such option for *update*
pipenv update requests --skip-lock
This implies that I'd have to uninstall black, then update the relevant package, then re-install black, for every attempt to update.
So far, all I've found is maybe telling pip to let all updates take the most recent pre-release packages, in this case for black and requests. This doesn't seem like a good idea when only black is a permanent pre-release package.
Also, note that pipenv in this case holding up everything because of --dev dependencies that won't matter in the final build.
Try installing a specific version of black.
#!/usr/bin/env bash
pipenv install requests
pipenv install black==18.9b0 # the latest as of 2018-12-09
pipenv update requests
pipenv update requests --pre
# afik, the --pre flag here doesn't do anything
cat Pipfile | grep allow_preleases
# avoids allowing prereleases for all packages

how can i install rmagick on ubuntu 17.04

Installing rmagick on Ubuntu
there are solutions for different versions of ubuntu, but none worked on 17.04 ?
sudo apt-get install libmagickwand-dev gives
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmagickwand-dev : Depends: imagemagick-6-common (= 8:6.9.7.4+dfsg-3ubuntu1) but 8:6.9.7.4+dfsg-3ubuntu1.2 is to be installed
Depends: libmagickwand-6.q16-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Couldn't find any solution for this. Updated to Ubuntu to 17.10, where it works fine.
You can search for any packages in ubuntu doing a sudo apt-cache search libmagickwand-dev and if you find the package you are looking for then install it doing sudo apt-get install libmagickwand-dev,
Installing all the unmet dependencies should fix the problem, and it is always helpful to do the commands below to upgrade any missing packages
sudo apt-get upgrade && sudo apt-get update
You should be able to install rmagick without any issues after this.

"Could not find a version that satisfies the requirement opencv-python"

I am struggling with Jetson TX2 board (aarch64).
I need to install python wrapper for OpenCV.
I can do:
$ sudo apt-get install python-opencv
But I cannot do:
$ sudo pip install opencv-python
Is this because there is no proper wheel file in http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv?
Is there a way to install opencv-python through pip?
We were getting the same error.For us, it solved by upgrading pip version (also discussed in FAQ of OpenCV GitHub). Earlier we had pip-7.1.0, post upgrading it to "pip-9.0.2", it successfully installed.
pip install --upgrade pip
pip install opencv-python
pip doesn't use http://www.lfd.uci.edu/~gohlke/pythonlibs/, it downloads packages from PyPI.
The problem is that you have an unusual architecture; pip cannot find a package for it and there is no source code package.
Unfortunately I think you're on your own. You have to download source code from https://github.com/skvark/opencv-python, install compiler and necessary libraries and compile OpenCV yourself.
Use this and it will work:
pip install --upgrade pip
pip install opencv-python
Another problem can be that the python version you are using is not yet supported by opencv-python.
E.g. as of right now there is no opencv-python for python 3.8. You would need to downgrade your python to 3.7.5 for now.
It happened with me on Windows, pip was not able to install opencv-python==3.4.0.12.
Later found out that it was due to the Python version, Python 3.7 has some issue with not getting linked to https://github.com/skvark/opencv-python.
Downgraded to Python 3.6 and it worked with:
pip3 install opencv-python
I faced the same issue but the mistake which I was making was pip install python-opencv where I should have used pip install opencv-python. Hope this helps to anyone. It took me few hours to find.
As there is no proper wheel file in http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv?
Try this:(Worked in Anaconda Prompt or Pycharm)
pip install opencv-contrib-python
pip install opencv-python
A way to do this is to install Anaconda on your computer.
Then you should be able to do:
pip install opencv-python
or
conda install opencv
I had the same error. The first time I used the 32-bit version of python but my computer is 64-bit. I then reinstalled the 64-bit version and succeeded.
Install it by using this command:
pip install opencv-contrib-python
I faced same issue while using Python 3.9.0.
Upgrading python to latest version (currently 3.9.1) and reinstalling opencv-python solved this issue.
I got this error and I solved it by simply waiting.
I had similar problem:
ERROR: Could not find a version that satisfies the requirement opencv-contrib-python (from versions: none)
Command pip update was not resolving my issue.
After lunch-time I tried again and it installed correctly the package.
Maybe the server was down.
I update the version of python, and then the issue was addressed. Please refer to this video: https://www.youtube.com/watch?v=BQnpRbbEZB4

Resources