Everything was working file until last week. It started breaking so I upgrade to python 3.8 but even that is failing. I also upgraded to focal image.
its failing with error /opt/build-bin/run-build-functions.sh: line 205: /opt/buildhome/pythonpython-3.8/bin/activate: No such file or directory
here’s pipfile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
mkdocs = "==1.2.3"
mkdocs-material = "==7.3.6"
pymdown-extensions = "==9.0"
Pygments = "==2.10.0"
Markdown = "==3.3.4"
[requires]
python_version = "3.8"
9:40:08 AM: Build ready to start
9:40:10 AM: build-image version: 8925038cf853b22d6397cdcb9904ac88b66bb383 (focal)
9:40:10 AM: build-image tag: v4.5.0
9:40:10 AM: buildbot version: 0e1298c157b10f24ae5c9a9af08df22d0babb90a
9:40:10 AM: Fetching cached dependencies
9:40:10 AM: Failed to fetch cache, continuing with build
9:40:10 AM: Starting to prepare the repo for build
9:40:11 AM: No cached dependencies found. Cloning fresh repo
9:40:11 AM: git clone https://github.com/bilal-fazlani/commanddotnet
9:40:12 AM: Preparing Git Reference pull/383/head
9:40:12 AM: Parsing package.json dependencies
9:40:12 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'site' versus 'site/' in the Netlify UI
9:40:13 AM: Starting build script
9:40:13 AM: Installing dependencies
9:40:13 AM: /opt/build-bin/run-build-functions.sh: line 205: /opt/buildhome/pythonpython-3.8/bin/activate: No such file or directory
The better the post - the faster the answer.
Hey @bilal-fazlani ,
I took a look at your recent builds and most of them seem successful and the ones that failed around the time you posted, had a different error in almost each one.
Are you still seeing this issue? if yes, do you mind linking us to the deploy that has this specific issue you mention?
here is an example failed build.
The recent build is passing because I am now using requirements.txt as a workaround. It is not working with pipfile. I would like to go back to using pipfile whenever that starts working again.
I have created a small test repo to reproduce this : Netlify App
Here, I am using python 3.8 with pipfile. It doesn’t work.
If I convert this into requirements.txt then it works
https://github.com/bilal-fazlani/netlify-test
netlify.toml
[build]
publish = "site/"
command = "mkdocs build"
Pipfile
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
mkdocs-material = "==8.0.2"
[requires]
python_version = "3.8"
Hey @bilal-fazlani ,
I could confirm this behaviour and have filed it for the team to look at:
opened 02:17PM - 05 Dec 21 UTC
type: bug
theme/dependencies
theme/language-support/python
**Describe the bug:**
Reported by user [on the forums](https://answers.netlif… y.com/t/python-build-is-not-working-anymore/47343/8).
When using `pipfile`, the build appears to fail (in installing Python dependencies phase) with the following error on `focal`:
```
ModuleNotFoundError: No module named 'pip._vendor.certifi'
```
and on `xenial`:
```
ImportError: No module named weakref
```
Both are using Python 2.7, but the error occurs when trying to use Python 3.8 on `focal` too. Since it fails in dependency installation phase, there is not much a user can do to create or fix this error.
Also, the same works when using `requirements.txt` instead of `pipfile`.
Repo to test: https://github.com/Hrishikesh-K/netlify-test
**Configuration:**
- Did you run your build through the UI or the CLI?: UI
**Deploy logs:**
`focal`: https://app.netlify.com/sites/keen-wiles-29d30e/deploys/61a8e53f4e2d862aa8977c72
`xenial`: https://app.netlify.com/sites/keen-wiles-29d30e/deploys/61acc95a9622e8adc53b1d8c
Is this related? When using mkdocs build
(and without any environment variables set), Netlify is trying to load Python 3.7:
9:41:06 AM: Installing dependencies
9:41:06 AM: /opt/build-bin/run-build-functions.sh: line 351: /opt/buildhome/python3.7/bin/activate: No such file or directory
9:41:06 AM: Error setting python version from runtime.txt
Can’t say for sure @jo81mj0y , could you share your site name?
Netlify currently only supports Python 2.7 and 3.8. Maybe try using Python 3.8 instead?