#๐ How to downgrade a module in anaconda jupyter notebook ?
27 messages ยท Page 1 of 1 (latest)
@supple isle
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Since both versions of the package share the same name only one can be installed at a time
Install the version you use more frequently, the other you can import from the local directory under an alias
Im not sure i understand the point here. I have to download the old version from github and renamed it ?
Basically yes, you can have one version installed like you currently do
The other version will import the older version under a different name
Eg import some-package as other-package
That way you get to use both versions
the point i dont get is how do i install the older version ?
I-ve always only use pip install to install module but if I use this it will erase the newer one
You cannot install another version of the same package
At least for the moment
Installing another version will overwrite your current installation
Try this
You can tell it to install a specific version, but it will override the other one. On the other hand, using two virtualenvs will let you install both versions on the same machine, but not use them at the same time.
Your best bet is to install both versions manually by putting them in your Python path with a different name.
But if your two libs expect them to have the same name (and they should), you will have to modify them so they pick up the version they need with some import alias such as:
import dependencyname_version as dependencyname
There is currently no clean way to do this. The best you can do is hope for this hack to work.
I'd rather ditch one of the two libs and replace it with an equivalent, or patch it to accept the new version of the dependency and give the patch back to the community.
Im trying to do this but i dont understand how to go about this part : "Your best bet is to install both versions manually by putting them in your Python path with a different name."
You could have two different virtual environments instead
Are you sure you can't fix the code to support the latest version?
yeah that was my original idea but i dont really know how to do this in jupyter notebook ?
they remove a function i was using (idk why they did this) so i cant really fix my code
You'd have two virtual environments and two notebooks
If you need to integrate them then you'll need to call one virtual environment in a subprocess from the other
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.