Comments (14)
WARNING: You are using pip version 21.1.2; however, version 21.1.3 is available.
You should consider upgrading via the '/home/pi/OctoPrint/venv/bin/python -m pip install --upgrade pip' command.
This is a warning directly from pip, not the script, I have no control over this.
Required dependency requests is missing... No plugins can be installed
This means the python3-requests
package is not installed on your system - it has nothing to do with the pip warning above. It is generally available in most OS installs, and it is needed to download the plugin repository list to find all the install locations as they are not on PyPi, and have to be installed using a URL instead. I haven't had an issue with people not having this package before, but there is error handling (as you found) to help try and explain what happened. I should probably make the warning show at the beginning of the script as well, so you know before you perform the upgrade.
I will test and release an update in the next few days that helps with some of these issues, now that we have dug into the causes. It's very difficult to work for everyone, so outside of OctoPi installs this is not well tested.
from octoprint-upgrade-to-py3.
What happens if you run the command python -m virtualenv --python=/usr/bin/python3 /home/pi/OctoPrint/venv_test
?
from octoprint-upgrade-to-py3.
(Side note) I am aware, that that command above is not very OS-agnostic, so if that doesn't work, try this one:
python3 -m venv /home/pi/OctoPrint/venv_test
from octoprint-upgrade-to-py3.
(Side note) I am aware, that that command above is not very OS-agnostic, so if that doesn't work, try this one:
python3 -m venv /home/pi/OctoPrint/venv_test
Thanks for the reply!
The new venv is created without problems.
from octoprint-upgrade-to-py3.
When the script fails it renames the current venv to venv.bak if this is useful for you, but the new one is not created.
from octoprint-upgrade-to-py3.
Which command have you used to create that? I see you quoted the reply with the alternative one, just wanted to confirm that the first one failed - if the second works, I think it makes more sense to make the script use that one instead.
from octoprint-upgrade-to-py3.
Which command have you used to create that? I see you quoted the reply with the alternative one, just wanted to confirm that the first one failed - if the second works, I think it makes more sense to make the script use that one instead.
I use the second.
Never tried the first.
from octoprint-upgrade-to-py3.
Please try the first, and report back whatever error you find, as I said if that doesn't work, try this one
from octoprint-upgrade-to-py3.
Please try the first, and report back whatever error you find, as I said if that doesn't work, try this one
The result:
/usr/local/bin/python3.9: No module named virtualenv
Then I install virtualenv for Python v3.9.5:
pip3 install virtualenv
And when I try to create again venv:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/python3'
The right path here is: /usr/local/bin/python3.9
from octoprint-upgrade-to-py3.
By modifying your script with the working command for the creation of the venv then the result is this:
Checking package list for python3-dev
Successfully checked python3-dev
Creating new Python 3 environment...
Successfully created Python 3 environment at /home/pi/OctoPrint/venv
Installing OctoPrint... (This may take a while - Do not cancel!)
Collecting required packages
Installing collected packages
Collecting required packages
Installing collected packages
WARNING: You are using pip version 21.1.2; however, version 21.1.3 is available.
You should consider upgrading via the '/home/pi/OctoPrint/venv/bin/python -m pip install --upgrade pip' command.
OctoPrint successfully installed!
Required dependency requests is missing... No plugins can be installed
OctoPrint has been installed, but no plugins have
Cleaning up...
Finished! OctoPrint should be ready to go
Once you have verified the install works, you can safely remove the folder /home/pi/OctoPrint/venv.bak
If you want to go back (If it doesn't work) to Python 2 download the file at:
https://raw.githubusercontent.com/cp2004/Octoprint-Upgrade-To-Py3/master/go_back.py
I have already come back without problems.
from octoprint-upgrade-to-py3.
You should consider upgrading via the '/home/pi/OctoPrint/venv/bin/python -m pip install --upgrade pip' command.
There is something misconfigured in my file system?
I don't understand why if in this way it installs Octoprint correctly then it doesn't install the plugins, maybe because once installed it doesn't find the updated version of pip before installing the plugins?
from octoprint-upgrade-to-py3.
This is the content of the wrong venv after go back:
from octoprint-upgrade-to-py3.
Thanks for the explanation!
"pip3 install requests" and now everything works!
from octoprint-upgrade-to-py3.
I'm trying on Orange Pi (Ubuntu 16.04.7 LTS and OctoPrint 1.7.2) to upgrade to python ver. 3 with python 2.7. When executing upgrade.py I get error: E: Command line option --allow-releaseinfo-change is not understood in combination with the other options
`
octoprint@OrangePi:$ python3 upgrade.py
OctoPrint Upgrade to Py 3 (v2.2.2)
This script will move your existing OctoPrint configuration from Python 2 to Python 3
This script requires an internet connection and it will disrupt any ongoing print jobs.
It will install the latest version of OctoPrint and all plugins.
No configuration or other files will be overwritten
Press [enter] to continue or ctrl-c to quit
Checking system info...
Please provide the path to your virtual environment and the config directory of OctoPrint
On OctoPi, this would be Yhome/pi/oprint' (for the venv), '/home/pi/.octoprint' (for config)
and service commands commands 'sudo service octoprint stop/start'
Virtual environment path: /home/octoprint/OctoPrint/venv
Found version: Python 2.7.12
Path valid
Config directory path: /home/octoprint/.octoprint
Config directory valid
To do the install, we need the service stop and start commands. (Leave blank if
you don't have a service set up)
Stop command: sudo service octoprint stop
Start command: sudo service octoprint start
Checking OctoPrint version...
OctoPrint version: 1.7.2
Reading installed plugins...
Plugins installed
- DisplayLayerProgress Plugin
- Slicer
- Sidebar Webcam
- STL Viewer
- Bed Visualizer
- GcodeEditor
- Detailed Progress
- OctoPrint Anywhere
- Dashboard
- Autoscroll
If you think there is something missing from here, please check the list of plugins in OctoPrint
Press [enter] to continue or ctrl-c to quit
Updating package list...
E: Command line option --allow-releaseinfo-change is not understood in combination with the other options
Please try manually
Cleaning up...
octoprint@OrangePi:$ I
orangepi@OrangePi:~$ python
Python 2.7.12 (default, Mar 1 2021, 11:38:31)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
orangepi@OrangePi:~$ python3
Python 3.8.9 (default, Apr 3 2021, 01:02:10)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
`
How can I fix it?
from octoprint-upgrade-to-py3.
Related Issues (20)
- Use Python 3 venv, install `python3-venv` first HOT 1
- [Bug] Pip errors as wheel is not working properly *sometimes*. HOT 4
- upgrade requires python 3.6? HOT 2
- [Bug] ibpython3.7-dev_3.7.3-2+deb10u2_armhf not found HOT 5
- X server needed to run that script ? HOT 2
- [Bug] UnicodeDecodeError running `sudo apt-get update` HOT 2
- [Bug] Can't set locale & Broken pipe error HOT 2
- Need to update pip as well or OctoPrint complains HOT 1
- Suppress pip's `Cache entry deserialization failed` messages HOT 2
- [Bug] After seemingly successful update to python 3, "Software Update" is disabled HOT 4
- [Bug] Updating to Python3 failed with SpaghettiDetective, no connection available anymore HOT 4
- [Bug] HOT 2
- Command line option --allow-releaseinfo-change is not understood in combination with the other options HOT 3
- Unsigned Repository stops script[Bug] HOT 18
- Installing octoprint fails due to "ValueError: HTML doctype missing or incorrect. Expected <!DOCTYPE html>." HOT 5
- ERROR: failed to update package list HOT 4
- [Bug] HOT 2
- Python --version shows 2.7.16 on fresh image? HOT 3
- [Bug] HOT 2
- [Bug] SSL certificate problem: certificate has expired HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octoprint-upgrade-to-py3.