I am trying to install dependencies with pipenv install and receive modal letting me know that Python quit unexpectedly:
I have uninstalled python, and installed from https://www.python.org/downloads/ (not using homebrew)
Python version: 3.9.9 ;
OS: Monterey 12.0.1
Pipfile:
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
Flask = "==2.0.2"
flask-marshmallow = "==0.14.0"
Flask-SQLAlchemy = "==2.5.1"
marshmallow-sqlalchemy = "==0.26.1"
Flask-Migrate = "==3.1.0"
pytest = "==6.2.5"
pytest-testdox = "==2.0.1"
black = "==21.9b0"
pylint = "==2.11.1"
pylint-flask-sqlalchemy = "==0.2.0"
[dev-packages]
[requires]
python_version = "3.9"
Terminal output after command:
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed!
WARNING: /Library/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python is loading libcrypto in an unsafe way
Could the problem be indicated by the failed locking? or loading libcrypto in an unsafe way?
Any one else run into something similar? Anything to try to resolve?
Thanks all
Adding sudo before command removed the error modal .. thank you #Josh Sharkey
Related
I’m having this weird issue with a virtual environment that is making me nuts
This is what I’ve tried so far. Maybe more options, but
Changed ipdb to dev packages
Updated pipfile
#### EXPLODED HERE ####
pipenv update
pipenv install
brew update
brew upgrade
==> Upgrading pipenv
2022.9.24 -> 2022.12.19
#### EXPLODED HERE AGAIN #### pipenv install | pipenv install --dev
git reset HARD to take back the commit (I even reverted the commit on git to be able to merge) --> this worked for Git, but not for my local
Removed virtualenv and tried again
pipenv shell
pipenv shell --python 3.9
pipenv install --dev
pipenv install pytest ### FAILED ###
pipenv install aenum ### FAILED ###
pipenv install aiohttp==3.8.1 ### FAILED ###
Docker build . #### ALSO FAILED ####
retry pipenv operations ### FAILED ###
The issue seems always the same, I copy a summary of the logs. Since the error log is HUGE. I just paste what seems more important.
NOTE: I found out that the package that is failing is pytest (I tried varius versions from 7.1.x to 7.2.x..)
0190253ad770c5df17db1 --hash=sha256:5cf820485f1b4c91e0417ea0afd41ce5cf5965011b3c22c400f6d144296ccbc0! Will try again.
An error occurred while installing ftfy==6.1.1 --hash=sha256:bfc2019f84fcd851419152320a6375604a0f1459c281b5b199b2cd0d2e727f8f --hash=sha256:0ffd33fce16b54cccaec78d6ec73d95ad370e5df5a25255c8966a6147bd667ca! Will try again.
An error occurred while installing gensim==4.3.0 --hash=sha256:e83d8ce322d6a3a93228944aba95e6951769d5238d49b6c5b89ad2515a56a136 --
An error occurred while installing decorator==5.1.1 ; python_version > '3.6' and python_version < '3.11' --hash=sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186 --hash=sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330! Will try again.
An error occurred while installing et-xmlfile==1.1.0 ; python_version >= '3.6' --hash=sha256:8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c --hash=sha256:a2ba85d1d6a74ef63837eed693bcb89c3f752169b0e3e7ae5b16ca5e1b3deada! Will try again.
An error occurred while installing fonttools==4.38.0 ; python_version >= '3.7' --hash=sha256:820466f43c8be8c3009aef8b87e785014133508f0de64ec469e4efb643ae54fb --hash=sha256:2bb244009f9bf3fa100fc3ead6aeb99febe5985fa20afbfbaa2f8946c2fbdaf1! Will try again.
An error occurred while installing frozenlist==1.3.3 ; python_version >= '3.7' --hash=sha256:f20380df709d91525e4bee04746ba612a4df0972c1b8f8e1e8af997e678c7b81 --
An error occurred while installing cycler==0.11.0 ; python_version >= '3.6' --hash=sha256:3a27e95f763a428a739d2add979fa7494c912a32c17c4c38c4d5f082cad165a3 --hash=sha256:9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f! Will try again.
An error occurred while installing cython==0.29.33 --hash=sha256:f271f90005064c49b47a93f456dc6cf0a21d21ef835bd33ac1e0db10ad51f84f --
An error occurred while installing aiohttp==3.8.1 --hash=sha256:086f92daf51a032d062ec5f58af5ca6a44d082c35299c96376a41cbb33034675 --hash=sha256:6f8b01295e26c68b3a1b90efb7a89029110d3a4139270b24fda961893216c440 --hash=sha256:99b5eeae8e019e7aad8af8bb314fb908dd2e028b3cdaad87ec05095394cce632 --hash=sha256:eaba923151d9deea315be1f3e2b31cc39a6d1d2f682f942905951f4e40200922 --
[1:22 PM] Installing dependencies from Pipfile.lock (e0f6e8)...
An error occurred while installing aenum==3.1.11 --hash=sha256:12ae89967f2e25c0ce28c293955d643f891603488bc3d9946158ba2b35203638 --hash=sha256:aed2c273547ae72a0d5ee869719c02a643da16bf507c80958faadc7e038e3f73 --hash=sha256:525b4870a27d0b471c265bda692bc657f1e0dd7597ad4186d072c59f9db666f6! Will try again.
An error occurred while installing aiohttp==3.8.1 --hash=sha256:2f2f69dca064926e79997f45b2f34e202b320fd3782f17a91941f7eb85502ee2 --
My Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
awswrangler = "*"
pandas = "*"
beautifulsoup4 = "*"
fake-headers = "*"
geopy = {extras = ["aiohttp"], version = "*"}
geotext = "*"
langid = "*"
tqdm = "*"
pytest = "*"
joblib = "*"
cython = "*"
gensim = "*"
opensearch-py = "*"
ftfy = "*"
sparse-dot-topn = "*"
scikit-learn = "*"
polyfuzz = "*"
[dev-packages]
pytest = "*"
pylint = "*"
pytest-mock = "*"
pytest-asyncio = "*"
pip = "*"
install = "*"
freezegun = "*"
ipython = "*"
wikidata = "*"
pyhamcrest = "*"
[requires]
python_version = "3.9"
I'm trying to install TensorFlow using pipenv.
This is my Pipfile:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
pylint = "*"
[packages]
python-telegram-bot = "*"
imdbpy = "*"
matplotlib = "*"
scikit-image = "*"
scikit-learn = "*"
tensorflow = "*"
[requires]
python_version = "3.8"
I then run:
pipenv install tensorflow
Which outputs:
Installing tensorflow…
Adding tensorflow to Pipfile's [packages]…
Installation Succeeded
Pipfile.lock (989c3d) out of date, updating to (0d6760)…
Locking [dev-packages] dependencies…
Success!
Locking [packages] dependencies…
Locking Failed!
Followed by a big traceback that ends with:
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in C:\Users\lucas\AppData\Local\Temp\tmpyh639mq4build\functools32\
My virtual environment uses Python 3.8.0 64 bit.
What am I doing wrong?
As the comments pointed out, Tensorflow only supports up to python 3.7 (as March 2020). You can find more info in the system requirements page of the documentation.
So, to fix your issue:
Remove the virtual environment with pipenv --rm
Remove the Pipfile.lock
Change the last lines of your Pipfile to
[requires]
python_version = "3.7"
Run pipenv install --dev to recreate the environment again and pipenv install tensorflow to install tensorflow
Done!
I'm trying to install the Shapely package to a cross-platform project using pipenv. However, on Windows, shapely can't be installed using a simple pipenv install shapely, it throws errors for a missing dependent dll. For this purpose, there is a pre-built wheel available from the famous unofficial package wheels by Christoph Gohlke:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
shapely = {file = "https://download.lfd.uci.edu/pythonlibs/n5jyqt7p/Shapely-1.6.4.post2-cp37-cp37m-win_amd64.whl", sys_platform = "== 'win32'"}
[dev-packages]
[requires]
python_version = "3.7"
This wheel is perfect for Windows, but only for Windows. So how do I specify in a Pipfile that, only if the platform is linux, it can simply pipenv install shapely as:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
shapely = "==1.6.4.post2"
[dev-packages]
[requires]
python_version = "3.7"
or is this not possible using pipenv? Or do I hack together a Pipfile.Windows file that my unfortunate Windows colleague can rename to Pipfile?
Many thanks for any pointers.
wheel distribution is ok with linux as well, sorry, don't know you linux distro, but you can try this:
[packages]
# for linux
shapely = {file = "https://files.pythonhosted.org/packages/97/36/1af447160f713d72f35dd7e749788367b7a13285c4af2fbd675128aa4e99/Shapely-1.6.4.post2-cp37-cp37m-manylinux1_x86_64.whl", platform_system="Linux"}
# for windows
shapely_win = {file = "https://download.lfd.uci.edu/pythonlibs/n5jyqt7p/Shapely-1.6.4.post2-cp37-cp37m-win_amd64.whl", platform_system="Windows"}
shapely_win name doesn't affect package installation
Hello everyone I'm new to python, pip, and virtual environments:
Im trying to install pygments in this way:
I moved to the directory of the project:
then :
pipenv install pygments
the package is being installed, but I think there is an issue in locking the packages.
the result is below :
Installing pygments...
Collecting pygments
Using cached
Installing collected packages: pygments
Successfully installed pygments-2.2.0
https://files.pythonhosted.org/packages/02/ee/b6e02dc6529e82b75bb06823ff7
005b141037cb1416b10c6f00fc419dca/Pygments-2.2.0-py2.py3-none-any.whl
Adding pygments to Pipfile's [packages]...
Pipfile.lock (a65489) out of date, updating to (688642)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
lib/python3.7/site-packages/pipenv/utils.py", line 402, in resolve_deps
req_dir=req_dir
File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-
packages/pipenv/utils.py", line 250, in actually_resolve_deps
req = Requirement.from_line(dep)
File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-
packages/pipenv/vendor/requirementslib/models/requirements.py", line
704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
I have the same problem, I have had this problem once, it seems that this problem will occur in Python3.6.
my Pipfile:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
pyinstaller = "*"
[dev-packages]
[requires]
python_version = "3.6"
I want to install flask and zappa, a common combination.
I use pipenv to create an evironment:
pipenv --python 3.6.4
I want to install packages:
pipenv install flask zappa
Unfortunately the requirements of flask is:
Werkzeug >= 0.14
the requirement of zappa is :
Werkzeug == 0.12
So this is not installable. What can i do?
Thanks to Evgeny this solution was successful. I could not find it in pipenv documentation.
Just manually edit the Pipfile:
Pipfile
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
[packages]
zappa = { git = 'https://github.com/Miserlou/Zappa.git', ref = 'master', editable = true }
flask = "*"
[requires]
python_version = "3.6"