Home
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Main category
Main forum
Bookworm SM16relind - Problems Thonny - import fails
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="macmack5" data-source="post: 613" data-attributes="member: 96"><p>In the latest OS for R Pi you are forced to use the virtual environment. For the long explanation:</p><p></p><p><a href="https://peps.python.org/pep-0668/" target="_blank">https://peps.python.org/pep-0668/</a> </p><p></p><p>The solution for Thonney development environment users:</p><p></p><p>(1) Create the virtual environment in thonney: </p><p> make a new, clean folder somewhere </p><p> switch to classic mode</p><p> tools / options / interpreter </p><p> (I set python3.11 as executable, too)</p><p> "New virtual environment"</p><p> select the new, clean folder you made in the first step</p><p>(2) command window</p><p> cd "new folder"</p><p> source bin/activate</p><p> cd bin</p><p> pip install SM16relind (or pip3.11 install SM16relind)</p><p>(3) import SM16relind</p><p> rel = SM16relind.SM16relind(0)</p><p> rel.set(1,1)</p><p> print(rel.get_all())</p><p>(4) Should return 1</p><p></p><p>Using the pip in the virtual environment is the key. Either use path, or change to the bin folder.</p></blockquote><p></p>
[QUOTE="macmack5, post: 613, member: 96"] In the latest OS for R Pi you are forced to use the virtual environment. For the long explanation: [URL]https://peps.python.org/pep-0668/[/URL] The solution for Thonney development environment users: (1) Create the virtual environment in thonney: make a new, clean folder somewhere switch to classic mode tools / options / interpreter (I set python3.11 as executable, too) "New virtual environment" select the new, clean folder you made in the first step (2) command window cd "new folder" source bin/activate cd bin pip install SM16relind (or pip3.11 install SM16relind) (3) import SM16relind rel = SM16relind.SM16relind(0) rel.set(1,1) print(rel.get_all()) (4) Should return 1 Using the pip in the virtual environment is the key. Either use path, or change to the bin folder. [/QUOTE]
Verification
Post reply
Home
Forums
Main category
Main forum
Bookworm SM16relind - Problems Thonny - import fails
Top